diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-02 17:09:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-02 17:09:48 +0300 |
commit | 270b231714d47afa5f3caa89f4ff2415d394c1fa (patch) | |
tree | 6149aef26922d5071e0ab9d7f036387d29b6c13b | |
parent | 38bed185876ab4e639412392005c0fe01e05d4f2 (diff) | |
download | mv-270b231714d47afa5f3caa89f4ff2415d394c1fa.tar.gz mv-270b231714d47afa5f3caa89f4ff2415d394c1fa.tar.bz2 mv-270b231714d47afa5f3caa89f4ff2415d394c1fa.tar.xz mv-270b231714d47afa5f3caa89f4ff2415d394c1fa.zip |
Fix code style.
-rw-r--r-- | src/actions/pets.cpp | 23 | ||||
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/characterviewnormal.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.h | 2 | ||||
-rw-r--r-- | src/inventory.cpp | 2 | ||||
-rw-r--r-- | src/inventory.h | 2 | ||||
-rw-r--r-- | src/net/cashshophandler.h | 1 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/markethandler.h | 4 | ||||
-rw-r--r-- | src/net/markethandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/markethandler.h | 1 | ||||
-rw-r--r-- | src/resources/db/itemdb.cpp | 2 |
14 files changed, 13 insertions, 39 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index cdb759c81..93bc9dc62 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -21,41 +21,20 @@ #include "actions/pets.h" #include "actormanager.h" -#include "configuration.h" #include "game.h" #include "emoteshortcut.h" -#include "inventory.h" -#include "item.h" -#include "party.h" #include "actions/actiondef.h" #include "being/localplayer.h" -#include "being/playerinfo.h" -#include "being/playerrelations.h" #include "gui/chatconsts.h" -#include "gui/viewport.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" -#include "gui/windows/outfitwindow.h" - -#include "gui/widgets/tabs/chat/whispertab.h" - -#include "net/adminhandler.h" #include "net/chathandler.h" -#include "net/guildhandler.h" -#include "net/homunculushandler.h" -#include "net/partyhandler.h" #include "net/pethandler.h" -#include "net/serverfeatures.h" - -#include "resources/iteminfo.h" #include "utils/chatutils.h" -#include "utils/gettext.h" -#include "utils/process.h" +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/game.cpp b/src/game.cpp index 8b85ac5ab..18615fa69 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -870,7 +870,7 @@ void Game::handleMove() localPlayer->cancelFollow(); } - if ((!inputManager.isActionActive(InputAction::EMOTE) + if ((!inputManager.isActionActive(InputAction::EMOTE) && !inputManager.isActionActive(InputAction::PET_EMOTE) && !inputManager.isActionActive(InputAction::STOP_ATTACK)) || direction == 0) diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index 97f195682..a4b9271e3 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -61,7 +61,6 @@ CharacterViewNormal::CharacterViewNormal(CharSelectDialog *const widget, { mSelected = -1; } - } setHeight(210 + config.getIntValue("fontSize") * 2); } diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index bcf72a0a1..9190f44f0 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1526,7 +1526,7 @@ bool ChatWindow::resortChatLog(std::string line, { const std::string nick = line.substr(0, idx2 - 1); line = line.substr(idx2 + 6); - localPetDirection(nick, static_cast<BeingDirection::Type>( + localPetDirection(nick, static_cast<uint8_t>( atoi(line.c_str()))); } else if (line.find(": \302\202\302a") != std::string::npos) @@ -1714,7 +1714,7 @@ void ChatWindow::localPetMove(const std::string &nick, } void ChatWindow::localPetDirection(const std::string &nick, - BeingDirection::Type dir) + uint8_t dir) { Being *const pet = getPetForNick(nick); if (pet) diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index 40f0a4a77..5644d7d3c 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -303,7 +303,7 @@ class ChatWindow final : public Window, const int x, const int y); static void localPetDirection(const std::string &nick, - BeingDirection::Type dir); + uint8_t dir); static void localPetAi(const std::string &nick, const bool start); diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h index 92f332296..f5b17eddd 100644 --- a/src/gui/windows/tradewindow.h +++ b/src/gui/windows/tradewindow.h @@ -86,7 +86,7 @@ class TradeWindow final : public Window, * Add an item to the trade window. */ void addItem2(const int id, - const int type, + const int type, const int *const cards, const int sz, const bool own, diff --git a/src/inventory.cpp b/src/inventory.cpp index 2b6f66cea..4c13db1a4 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -166,7 +166,7 @@ void Inventory::setItem(const int index, void Inventory::setCards(const int index, const int *const cards, - const int size) + const int size) const { if (index < 0 || index >= static_cast<int>(mSize)) { diff --git a/src/inventory.h b/src/inventory.h index e4afa9823..12f4b2f2a 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -115,7 +115,7 @@ class Inventory final void setCards(const int index, const int *const cards, - const int size); + const int size) const; /** * Remove a item from the inventory. diff --git a/src/net/cashshophandler.h b/src/net/cashshophandler.h index 78ae668eb..5e6421a0f 100644 --- a/src/net/cashshophandler.h +++ b/src/net/cashshophandler.h @@ -38,7 +38,6 @@ class CashShopHandler notfinal const int itemId, const unsigned char color, const int amount) const = 0; - }; } // namespace Net diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index ba6a5455f..c6191c512 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -105,8 +105,8 @@ void CashShopHandler::buyItem(const int points, outMsg.writeInt16(10 + 4, "len"); outMsg.writeInt32(points, "points"); outMsg.writeInt16(1, "count"); - outMsg.writeInt16(amount, "amount"); - outMsg.writeInt16(itemId, "item id"); + outMsg.writeInt16(static_cast<int16_t>(amount), "amount"); + outMsg.writeInt16(static_cast<int16_t>(itemId), "item id"); } } // namespace EAthena diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h index c910d6fdc..42a4bcac0 100644 --- a/src/net/eathena/markethandler.h +++ b/src/net/eathena/markethandler.h @@ -47,9 +47,9 @@ class MarketHandler final : public MessageHandler, const int amount) const override final; protected: - void processMarketOpen(Net::MessageIn &msg); + static void processMarketOpen(Net::MessageIn &msg); - void processMarketBuyAck(Net::MessageIn &msg); + static void processMarketBuyAck(Net::MessageIn &msg); static BuyDialog *mBuyDialog; }; diff --git a/src/net/markethandler.h b/src/net/markethandler.h index aecdce151..a80cfcea0 100644 --- a/src/net/markethandler.h +++ b/src/net/markethandler.h @@ -46,4 +46,4 @@ class MarketHandler notfinal extern Net::MarketHandler *marketHandler; -#endif // NET_MARKETNDLER_H +#endif // NET_MARKETHANDLER_H diff --git a/src/net/tmwa/markethandler.h b/src/net/tmwa/markethandler.h index ab527ca87..5ac55d993 100644 --- a/src/net/tmwa/markethandler.h +++ b/src/net/tmwa/markethandler.h @@ -43,7 +43,6 @@ class MarketHandler final : public MessageHandler, const int type, const unsigned char color, const int amount) const override final; - }; } // namespace TmwAthena diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index e6467a817..45fda0e66 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -40,8 +40,6 @@ #include "utils/delete2.h" #include "utils/dtor.h" -#include "utils/translation/podict.h" - #include "debug.h" namespace |