From 8963c582f2d2f2879b69821337a5c396f9712a06 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 20 Jun 2014 17:42:33 +0300 Subject: Fix code style. --- src/net/messagein.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/net/messagein.cpp') 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(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(temp >> 4); - serverDir = static_cast(data[2] & 0x000f); + const uint8_t serverDir = static_cast(data[2] & 0x000f); direction = fromServerDirection(serverDir); DEBUGLOG(std::string("readCoordinates: ").append(toString( -- cgit v1.2.3-70-g09d2