diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-05-13 19:57:49 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-05-16 23:25:35 +0200 |
commit | 32a27a534582b63324444b4650f08637834232fd (patch) | |
tree | 9e7f349f948864e551711a8c479a24cb0496f387 /src/net | |
parent | 1e164776a737b57c54a71f6eab8f93263146b089 (diff) | |
download | manaserv-32a27a534582b63324444b4650f08637834232fd.tar.gz manaserv-32a27a534582b63324444b4650f08637834232fd.tar.xz manaserv-32a27a534582b63324444b4650f08637834232fd.zip |
Random cleanups, adding const, removing unnecessary clear calls
Reviewed-by: Jared Adams
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/messagein.hpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/net/messagein.hpp b/src/net/messagein.hpp index 43f562a..7188419 100644 --- a/src/net/messagein.hpp +++ b/src/net/messagein.hpp @@ -23,8 +23,6 @@ #include <iosfwd> -class Packet; - /** * Used for parsing an incoming message. */ @@ -39,14 +37,12 @@ class MessageIn /** * Returns the message ID. */ - int - getId() const { return mId; } + int getId() const { return mId; } /** * Returns the total length of this message. */ - int - getLength() const { return mLength; } + int getLength() const { return mLength; } int readByte(); /**< Reads a byte. */ int readShort(); /**< Reads a short. */ @@ -57,18 +53,12 @@ class MessageIn * that the length of the string is stored in a short at the * start of the string. */ - std::string - readString(int length = -1); + std::string readString(int length = -1); /** * Returns the length of unread data. */ - int - getUnreadLength() const { return mLength - mPos; } - - /** - * Returns - */ + int getUnreadLength() const { return mLength - mPos; } private: const char *mData; /**< Packet data */ |