summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-20 17:42:33 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-20 21:11:13 +0300
commit8963c582f2d2f2879b69821337a5c396f9712a06 (patch)
tree9cc8f89e3116bb09ad3f4a30f7552fad6e83fe57 /src/net/messagein.cpp
parent65f5f9343a75a5adabdf840db93106cda71c703f (diff)
downloadmv-8963c582f2d2f2879b69821337a5c396f9712a06.tar.gz
mv-8963c582f2d2f2879b69821337a5c396f9712a06.tar.bz2
mv-8963c582f2d2f2879b69821337a5c396f9712a06.tar.xz
mv-8963c582f2d2f2879b69821337a5c396f9712a06.zip
Fix code style.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index cbdcd127c..ffda37e9c 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -92,7 +92,6 @@ uint8_t MessageIn::fromServerDirection(const uint8_t serverDir)
void MessageIn::readCoordinates(uint16_t &restrict x, uint16_t &restrict y,
uint8_t &restrict direction)
{
- uint8_t serverDir = 0;
if (mPos + 3 <= mLength)
{
const char *const data = mData + static_cast<size_t>(mPos);
@@ -101,7 +100,7 @@ void MessageIn::readCoordinates(uint16_t &restrict x, uint16_t &restrict y,
temp = MAKEWORD(data[2] & 0x00f0, data[1] & 0x003f);
y = static_cast<uint16_t>(temp >> 4);
- serverDir = static_cast<uint8_t>(data[2] & 0x000f);
+ const uint8_t serverDir = static_cast<uint8_t>(data[2] & 0x000f);
direction = fromServerDirection(serverDir);
DEBUGLOG(std::string("readCoordinates: ").append(toString(