summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-13 17:12:06 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-13 17:12:06 +0300
commitadb67cb947885af8f74eb8ad943d2862a198805d (patch)
tree13aac08184c59cae8b48a59293b64875b3f09ae5 /src
parent357560f6a8a0b61d94b6a70a519a2d3ece6f364d (diff)
downloadManaVerse-adb67cb947885af8f74eb8ad943d2862a198805d.tar.gz
ManaVerse-adb67cb947885af8f74eb8ad943d2862a198805d.tar.bz2
ManaVerse-adb67cb947885af8f74eb8ad943d2862a198805d.tar.xz
ManaVerse-adb67cb947885af8f74eb8ad943d2862a198805d.zip
fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp4
-rw-r--r--src/actions/commands.cpp4
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/windows/buydialog.cpp6
-rw-r--r--src/listeners/inputactionreplaylistener.cpp2
-rw-r--r--src/logger.cpp2
-rw-r--r--src/net/eathena/beinghandler.cpp1
-rw-r--r--src/net/eathena/gamehandler.cpp2
-rw-r--r--src/net/eathena/inventoryhandler.cpp2
-rw-r--r--src/net/eathena/loginhandler.cpp2
-rw-r--r--src/net/eathena/maphandler.h1
-rw-r--r--src/net/eathena/maptypeproperty2.h31
-rw-r--r--src/net/eathena/skillhandler.cpp2
-rw-r--r--src/net/eathena/tradehandler.cpp2
-rw-r--r--src/net/maphandler.h2
-rw-r--r--src/net/tmwa/generalhandler.cpp29
-rw-r--r--src/net/tmwa/maphandler.cpp12
-rw-r--r--src/net/tmwa/maphandler.h1
-rw-r--r--src/resources/db/horsedb.cpp1
-rw-r--r--src/resources/db/horsedb.h2
20 files changed, 57 insertions, 53 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 9f73f15ee..7d8e18591 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -78,12 +78,14 @@
#include "net/gamehandler.h"
#include "net/inventoryhandler.h"
#include "net/ipc.h"
+#ifdef EATHENA_SUPPORT
#include "net/mercenaryhandler.h"
+#include "net/vendinghandler.h"
+#endif
#include "net/npchandler.h"
#include "net/playerhandler.h"
#include "net/serverfeatures.h"
#include "net/uploadcharinfo.h"
-#include "net/vendinghandler.h"
#include "net/tradehandler.h"
#include "resources/iteminfo.h"
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index f51620e11..f7ad89b68 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -22,7 +22,9 @@
#include "actormanager.h"
#include "configuration.h"
+#ifdef EATHENA_SUPPORT
#include "emoteshortcut.h"
+#endif
#include "game.h"
#include "inventory.h"
#include "item.h"
@@ -46,7 +48,9 @@
#include "net/adminhandler.h"
#include "net/chathandler.h"
#include "net/guildhandler.h"
+#ifdef EATHENA_SUPPORT
#include "net/homunculushandler.h"
+#endif
#include "net/partyhandler.h"
#include "net/serverfeatures.h"
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 7bfa4afea..f6e848ce5 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -66,8 +66,10 @@
#include "net/beinghandler.h"
#include "net/chathandler.h"
#include "net/guildhandler.h"
+#ifdef EATHENA_SUPPORT
#include "net/homunculushandler.h"
#include "net/mercenaryhandler.h"
+#endif
#include "net/pethandler.h"
#include "net/serverfeatures.h"
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 8c0f90466..ce6775637 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -22,7 +22,9 @@
#include "gui/windows/buydialog.h"
+#ifdef EATHENA_SUPPORT
#include "actormanager.h"
+#endif
#include "configuration.h"
#include "shopitem.h"
#include "units.h"
@@ -46,11 +48,13 @@
#include "net/adminhandler.h"
#include "net/buysellhandler.h"
+#ifdef EATHENA_SUPPORT
#include "net/cashshophandler.h"
#include "net/markethandler.h"
-#include "net/npchandler.h"
#include "net/serverfeatures.h"
#include "net/vendinghandler.h"
+#endif
+#include "net/npchandler.h"
#include "resources/iteminfo.h"
diff --git a/src/listeners/inputactionreplaylistener.cpp b/src/listeners/inputactionreplaylistener.cpp
index 7c0f60c6a..11f81ee0f 100644
--- a/src/listeners/inputactionreplaylistener.cpp
+++ b/src/listeners/inputactionreplaylistener.cpp
@@ -31,7 +31,7 @@ InputActionReplayListener inputActionReplayListener;
InputActionReplayListener::InputActionReplayListener() :
ActionListener(),
mDialog(nullptr),
- mAction()
+ mAction(InputAction::NO_VALUE)
{
}
diff --git a/src/logger.cpp b/src/logger.cpp
index 0c004cb64..54357e828 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -363,7 +363,7 @@ void Logger::unimplimented(const int id)
return;
const std::string str = strprintf("Unimplimented packet: %d (0x%x)",
- id, id);
+ id, static_cast<unsigned int>(id));
DebugMessageListener::distributeEvent(str);
log(str);
}
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index aaac021ab..39ab454a1 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -25,7 +25,6 @@
#include "actormanager.h"
#include "effectmanager.h"
#include "game.h"
-#include "guildmanager.h"
#include "being/localplayer.h"
#include "being/mercenaryinfo.h"
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 1a2e312b5..4848946ce 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -210,7 +210,7 @@ void GameHandler::processMapLogin(Net::MessageIn &msg)
void GameHandler::processServerTick(Net::MessageIn &msg)
{
- //ignoring
+ // ignoring
msg.readInt32("tick");
}
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 63799f8db..820f9f71a 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -868,7 +868,7 @@ void InventoryHandler::processCartInfo(Net::MessageIn &msg)
mCartItems.clear();
}
-void InventoryHandler::processCartRemove(Net::MessageIn &msg A_UNUSED)
+void InventoryHandler::processCartRemove(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
// +++ need close or clear cart?
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index c7cee6b2e..8a02635b0 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -241,7 +241,7 @@ void LoginHandler::processLoginError2(Net::MessageIn &msg)
client->setState(STATE_ERROR);
}
-void LoginHandler::processUpdateHost2(Net::MessageIn &msg A_UNUSED)
+void LoginHandler::processUpdateHost2(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
}
diff --git a/src/net/eathena/maphandler.h b/src/net/eathena/maphandler.h
index 9b5499bf3..9c54ece6d 100644
--- a/src/net/eathena/maphandler.h
+++ b/src/net/eathena/maphandler.h
@@ -27,7 +27,6 @@
namespace EAthena
{
-class MessageOut;
class MapHandler final : public MessageHandler, public Net::MapHandler
{
diff --git a/src/net/eathena/maptypeproperty2.h b/src/net/eathena/maptypeproperty2.h
index a7d2b4c41..dc7ca5a0d 100644
--- a/src/net/eathena/maptypeproperty2.h
+++ b/src/net/eathena/maptypeproperty2.h
@@ -21,22 +21,29 @@
#ifndef NET_EATHENA_MAPTYPEPROPERTY2_H
#define NET_EATHENA_MAPTYPEPROPERTY2_H
+#if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#include <cstdint>
+#else
+#include <stdint.h>
+#endif
+
namespace EAthena
{
struct MapTypeProperty2Bits final
{
- unsigned int party : 1; // allow attack party members (PvP)
- unsigned int guild : 1; // allow attack guild members (GvG)
- unsigned int siege : 1; // show emblem in GvG (WoE castle)
- unsigned int mineffect : 1; // mine effect?
- unsigned int nolockon : 1; // unknown
- unsigned int countpk : 1; // show PvP counter
- unsigned int nopartyformation : 1; // prevent party creation/modification
- unsigned int bg : 1; // is on battle ground
- unsigned int noitemconsumption : 1; // unused
- unsigned int usecart : 1; // unused
- unsigned int summonstarmiracle : 1; // unused
- unsigned int SpareBits : 15; // unused bits
+ uint32_t party : 1; // allow attack party members (PvP)
+ uint32_t guild : 1; // allow attack guild members (GvG)
+ uint32_t siege : 1; // show emblem in GvG (WoE castle)
+ uint32_t mineffect : 1; // mine effect?
+ uint32_t nolockon : 1; // unknown
+ uint32_t countpk : 1; // show PvP counter
+ uint32_t nopartyformation : 1; // prevent party creation/
+ // modification
+ uint32_t bg : 1; // is on battle ground
+ uint32_t noitemconsumption : 1; // unused
+ uint32_t usecart : 1; // unused
+ uint32_t summonstarmiracle : 1; // unused
+ uint32_t SpareBits : 15; // unused bits
} __attribute__((packed));
union MapTypeProperty2 final
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 8a8962a50..762c60816 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -473,7 +473,7 @@ void SkillHandler::processSkillAutoSpells(Net::MessageIn &msg)
for (int f = 0; f < 7; f ++)
msg.readInt32("skill id");
- menu = MenuType::AutoSpell;;
+ menu = MenuType::AutoSpell;
}
void SkillHandler::processSkillDevotionEffect(Net::MessageIn &msg)
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index c11dc6927..5f9a60e47 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -264,7 +264,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
}
}
-void TradeHandler::processTradeUndo(Net::MessageIn &msg A_UNUSED)
+void TradeHandler::processTradeUndo(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
// +++ here need clear trade window from partner side?
diff --git a/src/net/maphandler.h b/src/net/maphandler.h
index 7e6adbc06..a88d07009 100644
--- a/src/net/maphandler.h
+++ b/src/net/maphandler.h
@@ -42,4 +42,4 @@ class MapHandler notfinal
extern Net::MapHandler *mapHandler;
#endif // EATHENA_SUPPORT
-#endif // NET_MAPTHANDLER_H
+#endif // NET_MAPHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index f18940630..867f9e10e 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -37,39 +37,42 @@
#include "gui/widgets/tabs/chat/partytab.h"
#include "net/tmwa/adminhandler.h"
-#include "net/tmwa/auctionhandler.h"
-#include "net/tmwa/bankhandler.h"
#include "net/tmwa/beinghandler.h"
-#include "net/tmwa/buyingstorehandler.h"
#include "net/tmwa/buysellhandler.h"
-#include "net/tmwa/cashshophandler.h"
#include "net/tmwa/chathandler.h"
#include "net/tmwa/charserverhandler.h"
-#include "net/tmwa/elementalhandler.h"
-#include "net/tmwa/familyhandler.h"
-#include "net/tmwa/friendshandler.h"
#include "net/tmwa/gamehandler.h"
#include "net/tmwa/guildhandler.h"
-#include "net/tmwa/homunculushandler.h"
#include "net/tmwa/inventoryhandler.h"
#include "net/tmwa/itemhandler.h"
#include "net/tmwa/loginhandler.h"
-#include "net/tmwa/mailhandler.h"
-#include "net/tmwa/maphandler.h"
-#include "net/tmwa/markethandler.h"
-#include "net/tmwa/mercenaryhandler.h"
#include "net/tmwa/network.h"
#include "net/tmwa/npchandler.h"
#include "net/tmwa/partyhandler.h"
#include "net/tmwa/pethandler.h"
#include "net/tmwa/playerhandler.h"
#include "net/tmwa/protocol.h"
-#include "net/tmwa/searchstorehandler.h"
#include "net/tmwa/serverfeatures.h"
#include "net/tmwa/tradehandler.h"
#include "net/tmwa/skillhandler.h"
#include "net/tmwa/questhandler.h"
+
+#ifdef EATHENA_SUPPORT
+#include "net/tmwa/auctionhandler.h"
+#include "net/tmwa/bankhandler.h"
+#include "net/tmwa/buyingstorehandler.h"
+#include "net/tmwa/cashshophandler.h"
+#include "net/tmwa/elementalhandler.h"
+#include "net/tmwa/familyhandler.h"
+#include "net/tmwa/friendshandler.h"
+#include "net/tmwa/homunculushandler.h"
+#include "net/tmwa/mailhandler.h"
+#include "net/tmwa/maphandler.h"
+#include "net/tmwa/markethandler.h"
+#include "net/tmwa/mercenaryhandler.h"
+#include "net/tmwa/searchstorehandler.h"
#include "net/tmwa/vendinghandler.h"
+#endif
#include "resources/db/itemdbstat.h"
diff --git a/src/net/tmwa/maphandler.cpp b/src/net/tmwa/maphandler.cpp
index da0cb2421..5cbae31b0 100644
--- a/src/net/tmwa/maphandler.cpp
+++ b/src/net/tmwa/maphandler.cpp
@@ -20,13 +20,6 @@
#include "net/tmwa/maphandler.h"
-#include "logger.h"
-
-#include "net/ea/eaprotocol.h"
-
-#include "net/tmwa/messageout.h"
-#include "net/tmwa/protocol.h"
-
#include "debug.h"
extern Net::MapHandler *mapHandler;
@@ -47,11 +40,6 @@ MapHandler::MapHandler() :
void MapHandler::handleMessage(Net::MessageIn &msg)
{
- switch (msg.getId())
- {
- default:
- break;
- }
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/maphandler.h b/src/net/tmwa/maphandler.h
index 184137ef2..f532c1bb6 100644
--- a/src/net/tmwa/maphandler.h
+++ b/src/net/tmwa/maphandler.h
@@ -29,7 +29,6 @@
namespace TmwAthena
{
-class MessageOut;
class MapHandler final : public MessageHandler, public Net::MapHandler
{
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp
index 6da742d3a..c6d364b27 100644
--- a/src/resources/db/horsedb.cpp
+++ b/src/resources/db/horsedb.cpp
@@ -22,7 +22,6 @@
#include "resources/db/horsedb.h"
#include "animatedsprite.h"
-#include "client.h"
#include "configuration.h"
#include "logger.h"
diff --git a/src/resources/db/horsedb.h b/src/resources/db/horsedb.h
index 93134a9b1..832f02c3c 100644
--- a/src/resources/db/horsedb.h
+++ b/src/resources/db/horsedb.h
@@ -27,8 +27,6 @@
#include "localconsts.h"
-class AnimatedSprite;
-
struct HorseInfo;
typedef std::map<int, HorseInfo*> HorseInfos;