@@ -18,29 +18,29 @@ class base_blob
18
18
{
19
19
protected:
20
20
static constexpr int WIDTH = BITS / 8 ;
21
- uint8_t data [WIDTH];
21
+ uint8_t m_data [WIDTH];
22
22
public:
23
23
base_blob ()
24
24
{
25
- memset (data , 0 , sizeof (data ));
25
+ memset (m_data , 0 , sizeof (m_data ));
26
26
}
27
27
28
28
explicit base_blob (const std::vector<unsigned char >& vch);
29
29
30
30
bool IsNull () const
31
31
{
32
32
for (int i = 0 ; i < WIDTH; i++)
33
- if (data [i] != 0 )
33
+ if (m_data [i] != 0 )
34
34
return false ;
35
35
return true ;
36
36
}
37
37
38
38
void SetNull ()
39
39
{
40
- memset (data , 0 , sizeof (data ));
40
+ memset (m_data , 0 , sizeof (m_data ));
41
41
}
42
42
43
- inline int Compare (const base_blob& other) const { return memcmp (data , other.data , sizeof (data )); }
43
+ inline int Compare (const base_blob& other) const { return memcmp (m_data , other.m_data , sizeof (m_data )); }
44
44
45
45
friend inline bool operator ==(const base_blob& a, const base_blob& b) { return a.Compare (b) == 0 ; }
46
46
friend inline bool operator !=(const base_blob& a, const base_blob& b) { return a.Compare (b) != 0 ; }
@@ -53,32 +53,32 @@ class base_blob
53
53
54
54
unsigned char * begin ()
55
55
{
56
- return &data [0 ];
56
+ return &m_data [0 ];
57
57
}
58
58
59
59
unsigned char * end ()
60
60
{
61
- return &data [WIDTH];
61
+ return &m_data [WIDTH];
62
62
}
63
63
64
64
const unsigned char * begin () const
65
65
{
66
- return &data [0 ];
66
+ return &m_data [0 ];
67
67
}
68
68
69
69
const unsigned char * end () const
70
70
{
71
- return &data [WIDTH];
71
+ return &m_data [WIDTH];
72
72
}
73
73
74
74
unsigned int size () const
75
75
{
76
- return sizeof (data );
76
+ return sizeof (m_data );
77
77
}
78
78
79
79
uint64_t GetUint64 (int pos) const
80
80
{
81
- const uint8_t * ptr = data + pos * 8 ;
81
+ const uint8_t * ptr = m_data + pos * 8 ;
82
82
return ((uint64_t )ptr[0 ]) | \
83
83
((uint64_t )ptr[1 ]) << 8 | \
84
84
((uint64_t )ptr[2 ]) << 16 | \
@@ -92,13 +92,13 @@ class base_blob
92
92
template <typename Stream>
93
93
void Serialize (Stream& s) const
94
94
{
95
- s.write ((char *)data , sizeof (data ));
95
+ s.write ((char *)m_data , sizeof (m_data ));
96
96
}
97
97
98
98
template <typename Stream>
99
99
void Unserialize (Stream& s)
100
100
{
101
- s.read ((char *)data , sizeof (data ));
101
+ s.read ((char *)m_data , sizeof (m_data ));
102
102
}
103
103
};
104
104
0 commit comments