mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Removed ACE dependies from ByteBuffer
This commit is contained in:
@@ -20,18 +20,16 @@
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <ace/Stack_Trace.h>
|
||||
#include <sstream>
|
||||
|
||||
ByteBufferPositionException::ByteBufferPositionException(bool add, size_t pos,
|
||||
size_t size, size_t valueSize)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ACE_Stack_Trace trace;
|
||||
|
||||
ss << "Attempted to " << (add ? "put" : "get") << " value with size: "
|
||||
<< valueSize << " in ByteBuffer (pos: " << pos << " size: " << size
|
||||
<< ")\n\n" << trace.c_str();
|
||||
<< ")\n\n";
|
||||
|
||||
message().assign(ss.str());
|
||||
}
|
||||
@@ -40,12 +38,10 @@ ByteBufferSourceException::ByteBufferSourceException(size_t pos, size_t size,
|
||||
size_t valueSize)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ACE_Stack_Trace trace;
|
||||
|
||||
ss << "Attempted to put a "
|
||||
<< (valueSize > 0 ? "NULL-pointer" : "zero-sized value")
|
||||
<< " in ByteBuffer (pos: " << pos << " size: " << size << ")\n\n"
|
||||
<< trace.c_str();
|
||||
<< " in ByteBuffer (pos: " << pos << " size: " << size << ")\n\n";
|
||||
|
||||
message().assign(ss.str());
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "Define.h"
|
||||
#include "Errors.h"
|
||||
#include "ByteConverter.h"
|
||||
#include "Util.h"
|
||||
|
||||
#include <ace/OS_NS_time.h>
|
||||
#include <exception>
|
||||
#include <list>
|
||||
#include <map>
|
||||
@@ -460,8 +460,7 @@ class ByteBuffer
|
||||
|
||||
void AppendPackedTime(time_t time)
|
||||
{
|
||||
tm lt;
|
||||
ACE_OS::localtime_r(&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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user