mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Treat CDataStream bytes as uint8_t
Also, rename CSerializeData to SerializeData
This commit is contained in:
@@ -203,7 +203,7 @@ public:
|
||||
class CDataStream
|
||||
{
|
||||
protected:
|
||||
typedef CSerializeData vector_type;
|
||||
using vector_type = SerializeData;
|
||||
vector_type vch;
|
||||
unsigned int nReadPos;
|
||||
|
||||
@@ -266,8 +266,8 @@ public:
|
||||
const_reference operator[](size_type pos) const { return vch[pos + nReadPos]; }
|
||||
reference operator[](size_type pos) { return vch[pos + nReadPos]; }
|
||||
void clear() { vch.clear(); nReadPos = 0; }
|
||||
iterator insert(iterator it, const char x=char()) { return vch.insert(it, x); }
|
||||
void insert(iterator it, size_type n, const char x) { vch.insert(it, n, x); }
|
||||
iterator insert(iterator it, const uint8_t x) { return vch.insert(it, x); }
|
||||
void insert(iterator it, size_type n, const uint8_t x) { vch.insert(it, n, x); }
|
||||
value_type* data() { return vch.data() + nReadPos; }
|
||||
const value_type* data() const { return vch.data() + nReadPos; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user