mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
chore(Core/Shared): little cleanup (#18385)
This commit is contained in:
@@ -78,7 +78,7 @@ std::string ByteBuffer::ReadCString(bool requireValidUtf8 /*= true*/)
|
||||
{
|
||||
std::string value;
|
||||
|
||||
while (rpos() < size()) // prevent crash at wrong string format in packet
|
||||
while (rpos() < size()) // prevent crash the wrong string format in a packet
|
||||
{
|
||||
char c = read<char>();
|
||||
if (c == 0)
|
||||
@@ -94,7 +94,7 @@ std::string ByteBuffer::ReadCString(bool requireValidUtf8 /*= true*/)
|
||||
|
||||
uint32 ByteBuffer::ReadPackedTime()
|
||||
{
|
||||
uint32 packedDate = read<uint32>();
|
||||
auto packedDate = read<uint32>();
|
||||
tm lt = tm();
|
||||
|
||||
lt.tm_min = packedDate & 0x3F;
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
class AC_SHARED_API ByteBuffer
|
||||
{
|
||||
public:
|
||||
constexpr static size_t DEFAULT_SIZE = 0x1000;
|
||||
constexpr static std::size_t DEFAULT_SIZE = 0x1000;
|
||||
|
||||
// constructor
|
||||
ByteBuffer()
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
_storage.reserve(DEFAULT_SIZE);
|
||||
}
|
||||
|
||||
ByteBuffer(size_t reserve) : _rpos(0), _wpos(0)
|
||||
explicit ByteBuffer(std::size_t reserve) : _rpos(0), _wpos(0)
|
||||
{
|
||||
_storage.reserve(reserve);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
|
||||
ByteBuffer(ByteBuffer const& right) = default;
|
||||
ByteBuffer(MessageBuffer&& buffer);
|
||||
explicit ByteBuffer(MessageBuffer&& buffer);
|
||||
virtual ~ByteBuffer() = default;
|
||||
|
||||
ByteBuffer& operator=(ByteBuffer const& right)
|
||||
|
||||
Reference in New Issue
Block a user