diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-21 16:30:11 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-21 16:30:11 +0000 |
commit | a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d (patch) | |
tree | f269a803b58b47082156dc74bb0d6e8e2dc6519e /src/net/messageout.cpp | |
parent | 1f6975d34e2c6fe8404fcbe13da406e624d94b68 (diff) | |
download | mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.gz mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.bz2 mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.xz mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.zip |
Renamed {read,write}{Byte,Short,Long} to {read,write}{Int8,Int16,Int32}. This
is less confusing in 64-bit context and less conflicting with the 0.0 client.
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r-- | src/net/messageout.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index 208196e2..10f1b1d4 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -33,7 +33,7 @@ MessageOut::MessageOut(short id): mDataSize(0), mPos(0) { - writeShort(id); + writeInt16(id); } MessageOut::~MessageOut() @@ -51,14 +51,14 @@ MessageOut::expand(size_t bytes) } void -MessageOut::writeByte(char value) +MessageOut::writeInt8(char value) { expand(mPos + 1); mData[mPos] = value; mPos += 1; } -void MessageOut::writeShort(short value) +void MessageOut::writeInt16(short value) { expand(mPos + 2); uint16_t t = ENET_HOST_TO_NET_16(value); @@ -67,7 +67,7 @@ void MessageOut::writeShort(short value) } void -MessageOut::writeLong(long value) +MessageOut::writeInt32(long value) { expand(mPos + 4); uint32_t t = ENET_HOST_TO_NET_32(value); @@ -82,7 +82,7 @@ MessageOut::writeString(const std::string &string, int length) if (length < 0) { // Write the length at the start if not fixed - writeShort(stringLength); + writeInt16(stringLength); length = stringLength; } else if (length < stringLength) |