File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ class CDataStream
187
187
protected:
188
188
using vector_type = SerializeData;
189
189
vector_type vch;
190
- unsigned int nReadPos{0 };
190
+ vector_type::size_type nReadPos{0 };
191
191
192
192
int nType;
193
193
int nVersion;
@@ -282,7 +282,7 @@ class CDataStream
282
282
if (dst.size () == 0 ) return ;
283
283
284
284
// Read from the beginning of the buffer
285
- auto next_read_pos{CheckedAdd< uint32_t > (nReadPos, dst.size ())};
285
+ auto next_read_pos{CheckedAdd (nReadPos, dst.size ())};
286
286
if (!next_read_pos.has_value () || next_read_pos.value () > vch.size ()) {
287
287
throw std::ios_base::failure (" CDataStream::read(): end of data" );
288
288
}
@@ -298,7 +298,7 @@ class CDataStream
298
298
void ignore (size_t num_ignore)
299
299
{
300
300
// Ignore from the beginning of the buffer
301
- auto next_read_pos{CheckedAdd< uint32_t > (nReadPos, num_ignore)};
301
+ auto next_read_pos{CheckedAdd (nReadPos, num_ignore)};
302
302
if (!next_read_pos.has_value () || next_read_pos.value () > vch.size ()) {
303
303
throw std::ios_base::failure (" CDataStream::ignore(): end of data" );
304
304
}
You can’t perform that action at this time.
0 commit comments