diff options
Diffstat (limited to 'src/server/shared/Packets/ByteBuffer.cpp')
-rw-r--r-- | src/server/shared/Packets/ByteBuffer.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp index 1775192227a..104ba96d9d0 100644 --- a/src/server/shared/Packets/ByteBuffer.cpp +++ b/src/server/shared/Packets/ByteBuffer.cpp @@ -23,7 +23,6 @@ #include <utf8.h> #include <sstream> #include <cmath> -#include <ctime> ByteBuffer::ByteBuffer(MessageBuffer&& buffer) : _rpos(0), _wpos(0), _bitpos(InitialBitPos), _curbitval(0), _storage(buffer.Move()) { @@ -92,21 +91,6 @@ std::string ByteBuffer::ReadString(uint32 length, bool requireValidUtf8 /*= true return value; } -uint32 ByteBuffer::ReadPackedTime() -{ - uint32 packedDate = read<uint32>(); - tm lt = tm(); - - lt.tm_min = packedDate & 0x3F; - lt.tm_hour = (packedDate >> 6) & 0x1F; - //lt.tm_wday = (packedDate >> 11) & 7; - lt.tm_mday = ((packedDate >> 14) & 0x3F) + 1; - lt.tm_mon = (packedDate >> 20) & 0xF; - lt.tm_year = ((packedDate >> 24) & 0x1F) + 100; - - return uint32(mktime(<)); -} - void ByteBuffer::append(uint8 const* src, size_t cnt) { ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size()); @@ -134,13 +118,6 @@ void ByteBuffer::append(uint8 const* src, size_t cnt) _wpos = newSize; } -void ByteBuffer::AppendPackedTime(time_t time) -{ - tm lt; - localtime_r(&time, <); - append<uint32>((lt.tm_year - 100) << 24 | lt.tm_mon << 20 | (lt.tm_mday - 1) << 14 | lt.tm_wday << 11 | lt.tm_hour << 6 | lt.tm_min); -} - void ByteBuffer::put(size_t pos, uint8 const* src, size_t cnt) { ASSERT(pos + cnt <= size(), "Attempted to put value with size: " SZFMTD " in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", cnt, pos, size()); |