summaryrefslogtreecommitdiff
path: root/src/net/messageout.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-09 01:14:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-09 01:14:05 +0300
commit8d1a43609fcf67bbffb26ab52fdb07f095f602b8 (patch)
tree7a9e548023cdf4f705a3a042aefb66d47645f74a /src/net/messageout.cpp
parentd9c62405db9a3f8bffaa5789bd63f59a65e29e3a (diff)
downloadmanaverse-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.gz
manaverse-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.bz2
manaverse-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.xz
manaverse-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.zip
improve messageout class.
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r--src/net/messageout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index 80255297e..3c20bce00 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -47,7 +47,7 @@ MessageOut::MessageOut(short id A_UNUSED):
void MessageOut::writeInt8(int8_t value)
{
- DEBUGLOG("writeInt8: " + toString(static_cast<int>(value)));
+ DEBUGLOG("writeInt8: " + toStringPrint(static_cast<int>(value)));
expand(1);
mData[mPos] = value;
mPos += 1;
@@ -56,7 +56,6 @@ void MessageOut::writeInt8(int8_t value)
void MessageOut::writeString(const std::string &string, int length)
{
- DEBUGLOG("writeString: " + string);
int stringLength = static_cast<int>(string.length());
if (length < 0)
{
@@ -79,12 +78,12 @@ void MessageOut::writeString(const std::string &string, int length)
memset(mData + mPos + stringLength, '\0', length - stringLength);
mPos += length;
+ DEBUGLOG("writeString: " + string);
PacketCounters::incOutBytes(length);
}
void MessageOut::writeStringNoLog(const std::string &string, int length)
{
- DEBUGLOG("writeString: ***");
int stringLength = static_cast<int>(string.length());
if (length < 0)
{
@@ -107,6 +106,7 @@ void MessageOut::writeStringNoLog(const std::string &string, int length)
memset(mData + mPos + stringLength, '\0', length - stringLength);
mPos += length;
+ DEBUGLOG("writeString: ***");
PacketCounters::incOutBytes(length);
}