summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
commit7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch)
tree5b2cfe1afe09bea1063f783050c1fb549daee76d /src/net/messagein.cpp
parentf68cbf700a99f2f184715a5b8025bcb4b6525391 (diff)
downloadManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz
ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2
ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz
ManaVerse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip
Fix more code style and additional warnings.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 0af0e389f..377cca6d3 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -50,7 +50,7 @@ MessageIn::MessageIn(const char *data, unsigned int length):
unsigned char MessageIn::readInt8()
{
- unsigned char value = -1;
+ unsigned char value = static_cast<unsigned char>(-1);
if (mPos < mLength)
value = static_cast<unsigned char>(mData[mPos]);
@@ -121,7 +121,7 @@ void MessageIn::readCoordinates(uint16_t &x, uint16_t &y, uint8_t &direction)
temp = MAKEWORD(data[2] & 0x00f0, data[1] & 0x003f);
y = static_cast<unsigned short>(temp >> 4);
- serverDir = data[2] & 0x000f;
+ serverDir = static_cast<uint8_t>(data[2] & 0x000f);
direction = fromServerDirection(serverDir);
}
mPos += 3;