From 8d1a43609fcf67bbffb26ab52fdb07f095f602b8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Apr 2013 01:14:05 +0300 Subject: improve messageout class. --- src/net/messageout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/net/messageout.cpp') 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(value))); + DEBUGLOG("writeInt8: " + toStringPrint(static_cast(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(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(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); } -- cgit v1.2.3-60-g2f50