diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-18 18:40:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-18 18:40:59 +0300 |
commit | 31cce4c22b369148f77d7092903af9462d8151c8 (patch) | |
tree | bd11e598db5ff6e17d3f0b283c44e333ac37d696 /src/net | |
parent | e6afa441a57718205c1f62bcbc0a5443fd513aa3 (diff) | |
download | mv-31cce4c22b369148f77d7092903af9462d8151c8.tar.gz mv-31cce4c22b369148f77d7092903af9462d8151c8.tar.bz2 mv-31cce4c22b369148f77d7092903af9462d8151c8.tar.xz mv-31cce4c22b369148f77d7092903af9462d8151c8.zip |
Fix code style.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/ea/inventoryitem.h | 8 | ||||
-rw-r--r-- | src/net/sdltcpnet.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 3 |
5 files changed, 18 insertions, 4 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 2b2d1cc9e..b7c827a4d 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -266,11 +266,12 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) if (mDebugInventory) { - logger->log("Index: %d, ID: %d, Type: %d, Identified: %d, " + logger->log("Index: %d, ID: %d, Type: %d, Identified: %u, " "Qty: %d, Cards: %d, %d, %d, %d, Refine: %u", index, itemId, itemType, static_cast<unsigned int>(identified), amount, - cards[0], cards[1], cards[2], cards[3], refine); + cards[0], cards[1], cards[2], cards[3], + static_cast<unsigned int>(refine)); } if (serverVersion < 1 && identified > 1U) diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index f46ff48be..0f1e372ee 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -23,6 +23,14 @@ #ifndef NET_EA_INVENTORYITEM_H #define NET_EA_INVENTORYITEM_H +#if defined(__GXX_EXPERIMENTAL_CXX0X__) +#include <cstdint> +#else +#include <stdint.h> +#endif + +#include "localconsts.h" + namespace Ea { diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp index 2bbb9837a..ebe165125 100644 --- a/src/net/sdltcpnet.cpp +++ b/src/net/sdltcpnet.cpp @@ -44,6 +44,9 @@ #include "debug.h" +#if !defined(__native_client__) \ + && (defined(TCP_THIN_LINEAR_TIMEOUTS) \ + || defined(TCP_THIN_DUPACK)) // because actual struct is hidden in SDL_net we reinroducing it here struct TCPsocketHack final { @@ -53,6 +56,7 @@ struct TCPsocketHack final IPaddress localAddress; int sflag; }; +#endif void TcpNet::init() { diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 67fff4029..c01ec4666 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -178,7 +178,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const int hat = msg.readInt16(); // head option top const int topClothes = msg.readInt16(); - uint8_t hairColor = msg.readUInt8(); + const uint8_t hairColor = msg.readUInt8(); msg.readUInt8(); // free tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 7ef237bbc..a31f6d1dc 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -133,7 +133,8 @@ void GeneralHandler::handleMessage(Net::MessageIn &msg) case SMSG_CONNECTION_PROBLEM: { const uint8_t code = msg.readUInt8(); - logger->log("Connection problem: %u", static_cast<int>(code)); + logger->log("Connection problem: %u", + static_cast<unsigned int>(code)); switch (code) { |