@@ -226,7 +226,7 @@ class CDataStream
226
226
: nType{nTypeIn},
227
227
nVersion{nVersionIn} {}
228
228
229
- explicit CDataStream (Span<const uint8_t > sp, int nTypeIn, int nVersionIn)
229
+ explicit CDataStream (Span<const value_type > sp, int nTypeIn, int nVersionIn)
230
230
: vch(sp.data(), sp.data() + sp.size()),
231
231
nType{nTypeIn},
232
232
nVersion{nVersionIn} {}
@@ -254,17 +254,17 @@ class CDataStream
254
254
iterator end () { return vch.end (); }
255
255
size_type size () const { return vch.size () - nReadPos; }
256
256
bool empty () const { return vch.size () == nReadPos; }
257
- void resize (size_type n, value_type c= 0 ) { vch.resize (n + nReadPos, c); }
257
+ void resize (size_type n, value_type c = value_type{}) { vch.resize (n + nReadPos, c); }
258
258
void reserve (size_type n) { vch.reserve (n + nReadPos); }
259
259
const_reference operator [](size_type pos) const { return vch[pos + nReadPos]; }
260
260
reference operator [](size_type pos) { return vch[pos + nReadPos]; }
261
261
void clear () { vch.clear (); nReadPos = 0 ; }
262
- iterator insert (iterator it, const uint8_t x) { return vch.insert (it, x); }
263
- void insert (iterator it, size_type n, const uint8_t x) { vch.insert (it, n, x); }
262
+ iterator insert (iterator it, const value_type x) { return vch.insert (it, x); }
263
+ void insert (iterator it, size_type n, const value_type x) { vch.insert (it, n, x); }
264
264
value_type* data () { return vch.data () + nReadPos; }
265
265
const value_type* data () const { return vch.data () + nReadPos; }
266
266
267
- void insert (iterator it, std::vector<uint8_t >::const_iterator first, std::vector<uint8_t >::const_iterator last)
267
+ void insert (iterator it, std::vector<value_type >::const_iterator first, std::vector<value_type >::const_iterator last)
268
268
{
269
269
if (last == first) return ;
270
270
assert (last - first > 0 );
@@ -278,7 +278,7 @@ class CDataStream
278
278
vch.insert (it, first, last);
279
279
}
280
280
281
- void insert (iterator it, const char * first, const char * last)
281
+ void insert (iterator it, const value_type * first, const value_type * last)
282
282
{
283
283
if (last == first) return ;
284
284
assert (last - first > 0 );
0 commit comments