Core/Packets: Simplified ByteBuffer constructor

This commit is contained in:
Shauren
2011-11-27 14:41:16 +01:00
parent 3a855f3f38
commit e8523b1c3c

View File

@@ -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);
}