diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
commit | 10a9dbacd9334caede10f1b21d42cdf7e1efcd03 (patch) | |
tree | def2baead68de5a9ccc842e25b3cdcfe9a638c9b /src/net/messagein.cpp | |
parent | e7f4e78f76972ca3882b9d2763ae9cab31675d3a (diff) | |
download | mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.gz mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.bz2 mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.xz mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.zip |
Style cleanups throughout most of the code. Splitting function type from
the function names should no longer be around.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r-- | src/net/messagein.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 345e02fc..387af70c 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -38,15 +38,13 @@ MessageIn::MessageIn(const char *data, unsigned int length): mId = readInt16(); } -Sint8 -MessageIn::readInt8() +Sint8 MessageIn::readInt8() { assert(mPos < mLength); return mData[mPos++]; } -Sint16 -MessageIn::readInt16() +Sint16 MessageIn::readInt16() { assert(mPos + 2 <= mLength); mPos += 2; @@ -57,8 +55,7 @@ MessageIn::readInt16() #endif } -Sint32 -MessageIn::readInt32() +Sint32 MessageIn::readInt32() { assert(mPos + 4 <= mLength); mPos += 4; @@ -69,8 +66,7 @@ MessageIn::readInt32() #endif } -void -MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) +void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) { assert(mPos + 3 <= mLength); @@ -119,8 +115,7 @@ MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) mPos += 3; } -void -MessageIn::readCoordinatePair(Uint16 &srcX, Uint16 &srcY, +void MessageIn::readCoordinatePair(Uint16 &srcX, Uint16 &srcY, Uint16 &dstX, Uint16 &dstY) { assert(mPos + 5 <= mLength); @@ -142,15 +137,13 @@ MessageIn::readCoordinatePair(Uint16 &srcX, Uint16 &srcY, mPos += 5; } -void -MessageIn::skip(unsigned int length) +void MessageIn::skip(unsigned int length) { assert(mPos + length <= mLength); mPos += length; } -std::string -MessageIn::readString(int length) +std::string MessageIn::readString(int length) { // Get string length if (length < 0) { |