diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-19 16:05:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-19 16:05:51 +0300 |
commit | 549acdd072b732135dfa7b79015abf7340bef585 (patch) | |
tree | 4ef633c931e05357dd1b89bd7b399ed0fbb0115f /src/gui | |
parent | 39276c4fc0e94f89a53e6c2cb05fd46edea3cc13 (diff) | |
download | mv-549acdd072b732135dfa7b79015abf7340bef585.tar.gz mv-549acdd072b732135dfa7b79015abf7340bef585.tar.bz2 mv-549acdd072b732135dfa7b79015abf7340bef585.tar.xz mv-549acdd072b732135dfa7b79015abf7340bef585.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 11 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 2 |
5 files changed, 6 insertions, 15 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 25e48708c..bccec33af 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -25,7 +25,6 @@ #include "actormanager.h" #include "configuration.h" #include "dropshortcut.h" -#include "game.h" #include "gamemodifiers.h" #include "guild.h" #include "guildmanager.h" @@ -46,11 +45,9 @@ #include "gui/windows/chatwindow.h" #include "gui/windows/equipmentwindow.h" #include "gui/windows/inventorywindow.h" -#include "gui/windows/itemamountwindow.h" #include "gui/windows/ministatuswindow.h" #include "gui/windows/npcdialog.h" #include "gui/windows/outfitwindow.h" -#include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/textcommandeditor.h" #include "gui/windows/textdialog.h" @@ -68,22 +65,16 @@ #include "net/adminhandler.h" #include "net/beinghandler.h" -#include "net/buysellhandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" #include "net/homunculushandler.h" -#include "net/inventoryhandler.h" #include "net/mercenaryhandler.h" -#include "net/npchandler.h" -#include "net/partyhandler.h" #include "net/pethandler.h" #include "net/serverfeatures.h" -#include "net/tradehandler.h" #include "resources/chatobject.h" #include "resources/iteminfo.h" #include "resources/mapitemtype.h" -#include "resources/skillconsts.h" #include "resources/db/npcdb.h" @@ -1565,7 +1556,7 @@ void PopupMenu::handleLink(const std::string &link, if (id >= 0) inputManager.executeAction(id); } - else if(!link.empty() && link[0] == '/') + else if (!link.empty() && link[0] == '/') { std::string cmd = link.substr(1); replaceAll(cmd, "'NAME'", mNick); diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index ff6fe2a8a..92892d6f4 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -928,8 +928,6 @@ void BrowserBox::moveSelectionUp() mSelectedLink --; } -#include "logger.h" - void BrowserBox::moveSelectionDown() { mSelectedLink ++; diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 05dfb2171..2380c694e 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -52,6 +52,8 @@ #include "debug.h" +#undef ERROR + static const BeingAction::Action actions[] = { BeingAction::STAND, diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 7cf268b0f..3f2414e9f 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -763,14 +763,14 @@ InventoryWindow *InventoryWindow::getFirstVisible() void InventoryWindow::nextTab() { - InventoryWindow *const window = getFirstVisible(); + const InventoryWindow *const window = getFirstVisible(); if (window) window->mFilter->nextTab(); } void InventoryWindow::prevTab() { - InventoryWindow *const window = getFirstVisible(); + const InventoryWindow *const window = getFirstVisible(); if (window) window->mFilter->prevTab(); } diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 5fc5420ee..827bd3550 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -1044,7 +1044,7 @@ bool UpdaterWindow::validateFile(const std::string &filePath, unsigned long UpdaterWindow::getFileHash(const std::string &filePath) { int size = 0; - char *const buf = static_cast<char*>(PhysFs::loadFile(filePath, size)); + const char *const buf = static_cast<const char*>(PhysFs::loadFile(filePath, size)); if (!buf) return 0; return Net::Download::adlerBuffer(buf, size); |