From 31cce4c22b369148f77d7092903af9462d8151c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Jul 2014 18:40:59 +0300 Subject: Fix code style. --- src/net/ea/inventoryhandler.cpp | 5 +++-- src/net/ea/inventoryitem.h | 8 ++++++++ src/net/sdltcpnet.cpp | 4 ++++ src/net/tmwa/charserverhandler.cpp | 2 +- src/net/tmwa/generalhandler.cpp | 3 ++- 5 files changed, 18 insertions(+), 4 deletions(-) (limited to 'src/net') 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(identified), amount, - cards[0], cards[1], cards[2], cards[3], refine); + cards[0], cards[1], cards[2], cards[3], + static_cast(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 +#else +#include +#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(code)); + logger->log("Connection problem: %u", + static_cast(code)); switch (code) { -- cgit v1.2.3-70-g09d2