diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-09 01:14:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-09 01:14:05 +0300 |
commit | 8d1a43609fcf67bbffb26ab52fdb07f095f602b8 (patch) | |
tree | 7a9e548023cdf4f705a3a042aefb66d47645f74a /src/net/messageout.cpp | |
parent | d9c62405db9a3f8bffaa5789bd63f59a65e29e3a (diff) | |
download | plus-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.gz plus-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.bz2 plus-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.tar.xz plus-8d1a43609fcf67bbffb26ab52fdb07f095f602b8.zip |
improve messageout class.
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r-- | src/net/messageout.cpp | 6 |
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); } |