@@ -226,7 +226,7 @@ class CDataStream
226226 : nType{nTypeIn},
227227 nVersion{nVersionIn} {}
228228
229- explicit CDataStream (Span<const uint8_t > sp, int nTypeIn, int nVersionIn)
229+ explicit CDataStream (Span<const value_type > sp, int nTypeIn, int nVersionIn)
230230 : vch(sp.data(), sp.data() + sp.size()),
231231 nType{nTypeIn},
232232 nVersion{nVersionIn} {}
@@ -254,17 +254,17 @@ class CDataStream
254254 iterator end () { return vch.end (); }
255255 size_type size () const { return vch.size () - nReadPos; }
256256 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); }
258258 void reserve (size_type n) { vch.reserve (n + nReadPos); }
259259 const_reference operator [](size_type pos) const { return vch[pos + nReadPos]; }
260260 reference operator [](size_type pos) { return vch[pos + nReadPos]; }
261261 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); }
264264 value_type* data () { return vch.data () + nReadPos; }
265265 const value_type* data () const { return vch.data () + nReadPos; }
266266
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)
268268 {
269269 if (last == first) return ;
270270 assert (last - first > 0 );
@@ -278,7 +278,7 @@ class CDataStream
278278 vch.insert (it, first, last);
279279 }
280280
281- void insert (iterator it, const char * first, const char * last)
281+ void insert (iterator it, const value_type * first, const value_type * last)
282282 {
283283 if (last == first) return ;
284284 assert (last - first > 0 );
0 commit comments