Core/Packets: Simplified ByteBuffer constructor
This commit is contained in:
1 parent
3a855f3f38
commit
e8523b1c3c
1 file changed
+1
-5
@@ -79,11 +79,7 @@ void BitStream::Print()
|
||||
ByteBuffer::ByteBuffer(size_t res, bool init): _rpos(0), _wpos(0), _bitpos(8), _curbitval(0)
|
||||
{
|
||||
if (init)
|
||||
{
|
||||
_storage.resize(res);
|
||||
for (size_t i = 0; i < res; ++i)
|
||||
*this << uint8(0);
|
||||
}
|
||||
_storage.resize(res, 0);
|
||||
else
|
||||
_storage.reserve(res);
|
||||
}
|
||||
Reference in new issue
Block a user