diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-29 21:30:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-29 21:30:57 +0300 |
commit | 478b08e4104e21d4c4e76b76534d3f177df94209 (patch) | |
tree | 9f4a45a150eac1ee96ff5695c5863a794649cbeb | |
parent | 366d596688506c70cbc510392be7f1224e585185 (diff) | |
download | manaverse-478b08e4104e21d4c4e76b76534d3f177df94209.tar.gz manaverse-478b08e4104e21d4c4e76b76534d3f177df94209.tar.bz2 manaverse-478b08e4104e21d4c4e76b76534d3f177df94209.tar.xz manaverse-478b08e4104e21d4c4e76b76534d3f177df94209.zip |
Fix code style.
34 files changed, 11 insertions, 63 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 5a329f2c7..4b967c873 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -29,7 +29,6 @@ #include "being/flooritem.h" #include "being/localplayer.h" -#include "being/playerinfo.h" #include "being/playerrelations.h" #include "const/gui/chat.h" @@ -64,12 +63,9 @@ #include "net/partyhandler.h" #include "net/serverfeatures.h" -#include "resources/iteminfo.h" #include "resources/chatobject.h" -#include "resources/inventory/inventory.h" - -#include "resources/item/item.h" +#include "resources/db/itemdb.h" #include "utils/chatutils.h" #include "utils/gettext.h" @@ -311,7 +307,6 @@ impHandler(chatAdd) if (floorItem) { str[0] = floorItem->getItemId(); - logger->log("parts: %d", (int)str.size()); const std::string names = ItemDB::getNamesStr(str); chatWindow->addItemText(names); } diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp index d0d0bf259..c8f0687d6 100644 --- a/src/being/flooritem.cpp +++ b/src/being/flooritem.cpp @@ -33,7 +33,7 @@ #include "resources/iteminfo.h" -#include "resources/item/item.h" +#include "resources/db/itemdb.h" #include "resources/map/map.h" diff --git a/src/const/resources/item/cards.h b/src/const/resources/item/cards.h index 7a58ed3ea..8e759fbc7 100644 --- a/src/const/resources/item/cards.h +++ b/src/const/resources/item/cards.h @@ -18,10 +18,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONST_RESOURCES_ITEM_ITEM_H -#define CONST_RESOURCES_ITEM_ITEM_H +#ifndef CONST_RESOURCES_ITEM_CARDS_H +#define CONST_RESOURCES_ITEM_CARDS_H -const int maxCards = 4; -const int maxMailCards = 4; +#define maxCards 4 +#define maxMailCards 4 -#endif // CONST_RESOURCES_ITEM_ITEM_H +#endif // CONST_RESOURCES_ITEM_CARDS_H diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index e74c102bb..1a9901beb 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -32,8 +32,6 @@ #include "resources/beingcommon.h" -#include "utils/files.h" - #include "debug.h" EffectManager *effectManager = nullptr; diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index bead76de5..e319ba7fd 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -24,7 +24,6 @@ #include "actormanager.h" #include "configuration.h" -#include "gamemodifiers.h" #include "party.h" #include "being/flooritem.h" @@ -66,7 +65,6 @@ #include "gui/widgets/tabs/chat/whispertab.h" #include "net/adminhandler.h" -#include "net/beinghandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" #ifdef EATHENA_SUPPORT diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index e91eda843..e3af82d2a 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -46,10 +46,6 @@ #include "net/chathandler.h" #include "net/serverfeatures.h" -#include "resources/iteminfo.h" - -#include "resources/db/itemdb.h" - #include "utils/chatutils.h" #include "utils/delete2.h" #include "utils/gettext.h" diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index 284aabc22..3bea8577f 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -46,7 +46,6 @@ #include "utils/delete2.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "utils/translation/podict.h" diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 9fc386499..b80f6d5fe 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -52,7 +52,6 @@ #include "net/skillhandler.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "utils/timer.h" diff --git a/src/resources/beingcommon.cpp b/src/resources/beingcommon.cpp index 67aeea4fb..d9b65bb02 100644 --- a/src/resources/beingcommon.cpp +++ b/src/resources/beingcommon.cpp @@ -25,14 +25,10 @@ #include "enums/resources/map/blockmask.h" -#include "utils/files.h" - #include "resources/beinginfo.h" #include "resources/sprite/spritereference.h" -#include <algorithm> - #include "debug.h" void BeingCommon::readBasicAttributes(BeingInfo *const info, diff --git a/src/resources/beingcommon.h b/src/resources/beingcommon.h index 04551092f..267ecaf2a 100644 --- a/src/resources/beingcommon.h +++ b/src/resources/beingcommon.h @@ -21,6 +21,7 @@ #ifndef RESOURCES_BEINGCOMMON_H #define RESOURCES_BEINGCOMMON_H +#include "utils/files.h" #include "utils/xml.h" #include "utils/stringvector.h" diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp index d11e8ab63..5b377b173 100644 --- a/src/resources/db/avatardb.cpp +++ b/src/resources/db/avatardb.cpp @@ -30,7 +30,6 @@ #include "resources/sprite/spritereference.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "configuration.h" diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp index de8f48499..1aa6167e2 100644 --- a/src/resources/db/badgesdb.cpp +++ b/src/resources/db/badgesdb.cpp @@ -22,8 +22,6 @@ #include "configuration.h" -#include "resources/beingcommon.h" - #include "utils/files.h" #include "utils/xmlutils.h" diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp index daf347473..335627c53 100644 --- a/src/resources/db/commandsdb.cpp +++ b/src/resources/db/commandsdb.cpp @@ -28,8 +28,6 @@ #include "resources/beingcommon.h" -#include "utils/files.h" - #include "debug.h" namespace diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp index ce77aa6b4..a2a6a6494 100644 --- a/src/resources/db/deaddb.cpp +++ b/src/resources/db/deaddb.cpp @@ -23,7 +23,6 @@ #include "configuration.h" #include "logger.h" -#include "utils/files.h" #include "utils/translation/podict.h" #include "resources/beingcommon.h" diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 32679a9dc..b2f9a0581 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -32,8 +32,6 @@ #include "resources/sprite/animatedsprite.h" -#include "utils/files.h" - #include "debug.h" namespace diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp index 6f8164742..e8d2f723e 100644 --- a/src/resources/db/homunculusdb.cpp +++ b/src/resources/db/homunculusdb.cpp @@ -28,7 +28,6 @@ #include "resources/beinginfo.h" #include "utils/dtor.h" -#include "utils/files.h" #include "configuration.h" diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp index 99139fb21..27987c657 100644 --- a/src/resources/db/horsedb.cpp +++ b/src/resources/db/horsedb.cpp @@ -28,7 +28,6 @@ #include "resources/horseinfo.h" #include "utils/dtor.h" -#include "utils/files.h" #include "debug.h" diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 620367bd1..ba5631293 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -29,7 +29,6 @@ #include "enums/resources/spritedirection.h" -#include "resources/beingcommon.h" #include "resources/iteminfo.h" #include "resources/itemtypemapdata.h" diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp index 521d7ac84..6d31c69f2 100644 --- a/src/resources/db/mapdb.cpp +++ b/src/resources/db/mapdb.cpp @@ -26,8 +26,6 @@ #include "resources/beingcommon.h" -#include "utils/files.h" - #include "debug.h" namespace diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp index bc5374f51..26476892d 100644 --- a/src/resources/db/mercenarydb.cpp +++ b/src/resources/db/mercenarydb.cpp @@ -28,7 +28,6 @@ #include "resources/beinginfo.h" #include "utils/dtor.h" -#include "utils/files.h" #include "configuration.h" diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp index 051fe09e5..3a803a9af 100644 --- a/src/resources/db/moddb.cpp +++ b/src/resources/db/moddb.cpp @@ -28,7 +28,6 @@ #include "resources/beingcommon.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp index 1c18ada0b..133b2545d 100644 --- a/src/resources/db/monsterdb.cpp +++ b/src/resources/db/monsterdb.cpp @@ -28,7 +28,6 @@ #include "resources/beinginfo.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "configuration.h" diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index dff7b4c70..1827cd859 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -31,7 +31,6 @@ #include "resources/sprite/spritereference.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp index 610925864..772a64a45 100644 --- a/src/resources/db/npcdialogdb.cpp +++ b/src/resources/db/npcdialogdb.cpp @@ -27,7 +27,6 @@ #include "resources/npcdialoginfo.h" #include "utils/dtor.h" -#include "utils/files.h" #include "debug.h" diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index 17ffba502..c2f6508c3 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -31,7 +31,6 @@ #include "resources/sprite/spritereference.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp index 6ffcfbe18..c59f6f616 100644 --- a/src/resources/db/skillunitdb.cpp +++ b/src/resources/db/skillunitdb.cpp @@ -31,7 +31,6 @@ #include "resources/sprite/spritereference.h" #include "utils/dtor.h" -#include "utils/files.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp index 955a20d1f..238e17b51 100644 --- a/src/resources/db/sounddb.cpp +++ b/src/resources/db/sounddb.cpp @@ -27,8 +27,6 @@ #include "resources/beingcommon.h" -#include "utils/files.h" - #include "debug.h" namespace diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index f55551982..780156910 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -50,7 +50,6 @@ #include "utils/base64.h" #include "utils/delete2.h" -#include "utils/files.h" #include "utils/stringmap.h" #include <zlib.h> @@ -745,7 +744,6 @@ bool MapReader::readCsvLayer(const XmlNodePtrConst childNode, oldPos = pos + 1; } - //XmlFree(const_cast<char*>(xmlChars)); return true; } diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index f628cd7ae..f4b1ce4e9 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -37,8 +37,6 @@ #include "resources/sprite/animatedsprite.h" -#include "utils/files.h" - #include "debug.h" static void unloadMap(std::map<int, StatusEffect *> &map); diff --git a/src/text.cpp b/src/text.cpp index 9796877cf..09f30a0e6 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -178,11 +178,6 @@ void Text::draw(Graphics *const graphics, const int xOff, const int yOff) BLOCK_END("Text::draw") } -//int Text::getWidth() -//{ -// return mTextChunk.img->getWidth(); -//} - FlashText::FlashText(const std::string &text, const int x, const int y, const Graphics::Alignment alignment, diff --git a/src/units.cpp b/src/units.cpp index 28e21e7e5..6d7e2a49c 100644 --- a/src/units.cpp +++ b/src/units.cpp @@ -27,8 +27,6 @@ #include "resources/beingcommon.h" -#include "utils/files.h" - #include <climits> #include "debug.h" diff --git a/src/utils/files.cpp b/src/utils/files.cpp index 0a3f3eb92..6408a8061 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -70,7 +70,7 @@ void Files::extractLocale() resourceManager->removeFromSearchPath(fileName2); remove(fileName2.c_str()); } -#endif // ANDROID +#endif // ANDROID #if defined(ANDROID) || defined(__native_client__) diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index dadfd35f5..03f33688c 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -970,8 +970,6 @@ std::string timeDiffToString(int timeDiff) return str; } -#include "logger.h" - #ifndef DYECMD void replaceItemLinks(std::string &msg) { diff --git a/src/utils/xml/pugixml.h b/src/utils/xml/pugixml.h index 69864959d..ed4456bb7 100644 --- a/src/utils/xml/pugixml.h +++ b/src/utils/xml/pugixml.h @@ -148,7 +148,8 @@ namespace XML } // namespace XML #define for_each_xml_child_node(var, parent) \ - for (pugi::xml_node var = parent.first_child(); var; var = var.next_sibling()) + for (pugi::xml_node var = parent.first_child(); \ + var; var = var.next_sibling()) #endif // ENABLE_PUGIXML #endif // UTILS_XML_PUGIXML_H |