summaryrefslogtreecommitdiff
path: root/src/net/messageout.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 14:52:47 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 14:52:47 +0000
commiteb753d99914a0941ad7e2cfa4c8a364723340fc9 (patch)
tree4b43acd7426ae91c5f8ec90e75118b30931baafb /src/net/messageout.cpp
parent760d4498bd6a7a079cbff9b79d4dfcdde2e4665e (diff)
downloadmana-eb753d99914a0941ad7e2cfa4c8a364723340fc9.tar.gz
mana-eb753d99914a0941ad7e2cfa4c8a364723340fc9.tar.bz2
mana-eb753d99914a0941ad7e2cfa4c8a364723340fc9.tar.xz
mana-eb753d99914a0941ad7e2cfa4c8a364723340fc9.zip
Added stream operator for char, short and long reading and writing.
Diffstat (limited to 'src/net/messageout.cpp')
-rw-r--r--src/net/messageout.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index 272cac4e..d25cc62b 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -129,3 +129,21 @@ const Packet *MessageOut::getPacket()
return mPacket;
}
+
+MessageOut& operator<<(MessageOut &msg, const char &rhs)
+{
+ msg.writeByte(rhs);
+ return msg;
+}
+
+MessageOut& operator<<(MessageOut &msg, const short &rhs)
+{
+ msg.writeShort(rhs);
+ return msg;
+}
+
+MessageOut& operator<<(MessageOut &msg, const long &rhs)
+{
+ msg.writeLong(rhs);
+ return msg;
+}