summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-12 21:28:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-12 21:28:54 +0300
commit5c66d91e3e69446081ef6254063ad638fbc48aca (patch)
treec3bb94057bcd4bdbb8568e815c7f18c44417a78a /src
parentf6000c9088ee63428f65ee980f6751f85a7e7d7e (diff)
downloadmanaplus-5c66d91e3e69446081ef6254063ad638fbc48aca.tar.gz
manaplus-5c66d91e3e69446081ef6254063ad638fbc48aca.tar.bz2
manaplus-5c66d91e3e69446081ef6254063ad638fbc48aca.tar.xz
manaplus-5c66d91e3e69446081ef6254063ad638fbc48aca.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp2
-rw-r--r--src/depricatedevent.h2
-rw-r--r--src/gui/questswindow.cpp1
-rw-r--r--src/gui/quitdialog.cpp4
-rw-r--r--src/gui/statuspopup.cpp4
-rw-r--r--src/gui/statuspopup.h2
-rw-r--r--src/guildmanager.cpp2
-rw-r--r--src/keyboardconfig.cpp3
-rw-r--r--src/mobileopenglgraphics.cpp6
-rw-r--r--src/net/ea/buysellhandler.cpp2
-rw-r--r--src/net/ea/chathandler.cpp2
-rw-r--r--src/net/ea/gamehandler.cpp2
-rw-r--r--src/net/ea/guildhandler.cpp2
-rw-r--r--src/net/ea/inventoryhandler.cpp2
-rw-r--r--src/net/ea/partyhandler.cpp2
-rw-r--r--src/net/ea/playerhandler.cpp2
-rw-r--r--src/net/ea/skillhandler.cpp2
-rw-r--r--src/net/ea/tradehandler.cpp2
-rw-r--r--src/net/eathena/adminhandler.cpp2
-rw-r--r--src/net/eathena/buysellhandler.cpp2
-rw-r--r--src/net/eathena/partyhandler.cpp2
-rw-r--r--src/net/tmwa/adminhandler.cpp2
-rw-r--r--src/net/tmwa/buysellhandler.cpp2
-rw-r--r--src/net/tmwa/partyhandler.cpp2
-rw-r--r--src/normalopenglgraphics.cpp12
-rw-r--r--src/notifications.h7
-rw-r--r--src/notifymanager.cpp10
-rw-r--r--src/utils/process.cpp2
28 files changed, 35 insertions, 52 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index abd30f713..64bb6ba3b 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -348,7 +348,7 @@ impHandler0(clear)
impHandler0(cleanGraphics)
{
ResourceManager *const resman = ResourceManager::getInstance();
- while(resman->cleanOrphans(true));
+ while (resman->cleanOrphans(true));
if (debugChatTab)
debugChatTab->chatLog(_("Cache cleaned"));
diff --git a/src/depricatedevent.h b/src/depricatedevent.h
index 2cdceb9f6..79058cd56 100644
--- a/src/depricatedevent.h
+++ b/src/depricatedevent.h
@@ -50,7 +50,7 @@ enum DepricatedEvents
EVENT_SERVERNOTICE,
EVENT_STATECHANGE,
EVENT_UPDATEATTRIBUTE,
- EVENT_UPDATESTAT,
+ EVENT_UPDATESTAT
};
class Listener;
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index 390c60314..c4f3a6928 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -24,7 +24,6 @@
#include "configuration.h"
#include "effectmanager.h"
#include "localplayer.h"
-#include "map.h"
#include "soundmanager.h"
#include "gui/gui.h"
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index b2e3f7d94..51e6cdba7 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -70,10 +70,10 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe):
const State state = Client::getState();
- mNeedForceQuit = state == STATE_CHOOSE_SERVER
+ mNeedForceQuit = (state == STATE_CHOOSE_SERVER
|| state == STATE_CONNECT_SERVER || state == STATE_LOGIN
|| state == STATE_PRE_LOGIN || state == STATE_LOGIN_ATTEMPT
- || state == STATE_UPDATE || state == STATE_LOAD_DATA;
+ || state == STATE_UPDATE || state == STATE_LOAD_DATA);
// All states, when we're not logged in to someone.
if (mNeedForceQuit)
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index f4b06991c..d8234b81a 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -189,8 +189,8 @@ void StatusPopup::view(const int x, const int y)
}
void StatusPopup::setLabelText(Label *const label,
- const std::string &text,
- const Input::KeyAction key) const
+ const std::string &text,
+ const Input::KeyAction key) const
{
label->setCaption(strprintf("%s %s", text.c_str(),
inputManager.getKeyValueString(static_cast<int>(key)).c_str()));
diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h
index 128345d51..1547d9cfc 100644
--- a/src/gui/statuspopup.h
+++ b/src/gui/statuspopup.h
@@ -64,7 +64,7 @@ class StatusPopup final : public Popup
void updateLabels();
void setLabelText(Label *const label, const std::string &text,
- const Input::KeyAction key) const;
+ const Input::KeyAction key) const;
Label *mMoveType;
Label *mCrazyMoveType;
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 7e096a276..765c86a4c 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -34,8 +34,6 @@
#include "net/chathandler.h"
#include "net/net.h"
-#include "utils/gettext.h"
-
#include "debug.h"
static const int requestTimeout = 5;
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index 7287ed3ad..47ef4a06c 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -214,7 +214,8 @@ void KeyboardConfig::handleRepeat(const int time)
}
if (repeat)
{
- if (time > keyTime && abs(time - keyTime) > mRepeatTime)
+ if (time > keyTime && abs(time - keyTime)
+ > static_cast<signed>(mRepeatTime))
{
keyTime = time;
inputManager.triggerAction(getActionVectorByKey(key));
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp
index f0ec87d36..4ffe426ab 100644
--- a/src/mobileopenglgraphics.cpp
+++ b/src/mobileopenglgraphics.cpp
@@ -452,7 +452,8 @@ void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image,
const float texY2 = texY1 + tFractionH * visibleFractionH;
for (int px = 0; px < w; px += scaledWidth)
{
- const int width = (px + scaledWidth >= w) ? w - px : scaledWidth;
+ const int width = (px + scaledWidth >= w)
+ ? w - px : scaledWidth;
const int dstX = x + px;
const float visibleFractionW = static_cast<float>(width)
/ scaledWidth;
@@ -1175,7 +1176,8 @@ bool MobileOpenGLGraphics::drawNet(const int x1, const int y1,
return true;
}
-void MobileOpenGLGraphics::bindTexture(const GLenum target, const GLuint texture)
+void MobileOpenGLGraphics::bindTexture(const GLenum target,
+ const GLuint texture)
{
if (mLastImage != texture)
{
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 2838f8351..d1cf17007 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -39,8 +39,6 @@
#include "net/chathandler.h"
-#include "utils/gettext.h"
-
#include "debug.h"
namespace Ea
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 9f67bfbcf..c6e490b00 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -35,8 +35,6 @@
#include "gui/widgets/chattab.h"
#include "gui/widgets/gmtab.h"
-#include "utils/gettext.h"
-
#include <string>
#include "debug.h"
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 4f1a6d5d6..19978979b 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -29,8 +29,6 @@
#include "gui/okdialog.h"
-#include "utils/gettext.h"
-
#include "debug.h"
namespace Ea
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index b521e313a..51996244b 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -28,8 +28,6 @@
#include "gui/socialwindow.h"
-#include "utils/gettext.h"
-
#include "debug.h"
namespace Ea
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 1f589356e..df0b5c824 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -29,8 +29,6 @@
#include "net/ea/eaprotocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern int serverVersion;
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 7ab8ae5e8..6172fce34 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -28,8 +28,6 @@
#include "gui/socialwindow.h"
-#include "utils/gettext.h"
-
#include "debug.h"
namespace Ea
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 61da61b65..655d6be60 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -38,8 +38,6 @@
#include "net/ea/eaprotocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern OkDialog *weightNotice;
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp
index 35d8d61dc..ed2b1973d 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/skillhandler.cpp
@@ -33,8 +33,6 @@
#include "net/messageout.h"
-#include "utils/gettext.h"
-
#include "debug.h"
/** job dependend identifiers (?) */
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 3a401349a..961f8ff62 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -36,8 +36,6 @@
#include "net/ea/eaprotocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern std::string tradePartnerName;
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index d0c763be4..23909bef1 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -31,8 +31,6 @@
#include "net/eathena/protocol.h"
-#include "utils/gettext.h"
-
#include <string>
#include "debug.h"
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 3e81304b0..fff2e2cef 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -43,8 +43,6 @@
#include "net/eathena/chathandler.h"
#include "net/eathena/protocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern Net::BuySellHandler *buySellHandler;
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 264b2bd26..9f7772757 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -29,8 +29,6 @@
#include "net/eathena/gui/partytab.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern Net::PartyHandler *partyHandler;
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 7e5e582c0..dcb29e247 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -31,8 +31,6 @@
#include "net/tmwa/protocol.h"
-#include "utils/gettext.h"
-
#include <string>
#include "debug.h"
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 997a6220c..6e70fc364 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -43,8 +43,6 @@
#include "net/tmwa/chathandler.h"
#include "net/tmwa/protocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern Net::BuySellHandler *buySellHandler;
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 44fca8a6f..583bfa60f 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -29,8 +29,6 @@
#include "net/tmwa/gui/partytab.h"
-#include "utils/gettext.h"
-
#include "debug.h"
extern Net::PartyHandler *partyHandler;
diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp
index 2b39c9fd1..b26c029a7 100644
--- a/src/normalopenglgraphics.cpp
+++ b/src/normalopenglgraphics.cpp
@@ -1376,8 +1376,10 @@ inline void NormalOpenGLGraphics::drawQuadArrayfi(const int size)
glDrawArrays(GL_QUADS, 0, size / 2);
}
-inline void NormalOpenGLGraphics::drawQuadArrayfi(const GLint *const intVertArray,
- const GLfloat *const floatTexArray,
+inline void NormalOpenGLGraphics::drawQuadArrayfi(const GLint *const
+ intVertArray,
+ const GLfloat *const
+ floatTexArray,
const int size)
{
glVertexPointer(2, GL_INT, 0, intVertArray);
@@ -1400,8 +1402,10 @@ inline void NormalOpenGLGraphics::drawQuadArrayii(const int size)
glDrawArrays(GL_QUADS, 0, size / 2);
}
-inline void NormalOpenGLGraphics::drawQuadArrayii(const GLint *const intVertArray,
- const GLint *const intTexArray,
+inline void NormalOpenGLGraphics::drawQuadArrayii(const GLint *const
+ intVertArray,
+ const GLint *const
+ intTexArray,
const int size)
{
glVertexPointer(2, GL_INT, 0, intVertArray);
diff --git a/src/notifications.h b/src/notifications.h
index a8ac55e0e..5906eea74 100644
--- a/src/notifications.h
+++ b/src/notifications.h
@@ -21,6 +21,8 @@
#ifndef NOTIFYCATIONS_H
#define NOTIFYCATIONS_H
+#include "localconsts.h"
+
#include "utils/gettext.h"
namespace NotifyManager
@@ -37,7 +39,7 @@ namespace NotifyManager
SPEECH
};
- struct NotificationInfo
+ struct NotificationInfo final
{
const char *text;
const NotifyFlags flags;
@@ -169,7 +171,8 @@ namespace NotifyManager
{N_("Equip arrows first."), EMPTY},
{N_("Trading with %s isn't possible. Trade partner is too far away."),
STRING},
- {N_("Trading with %s isn't possible. Character doesn't exist."), STRING},
+ {N_("Trading with %s isn't possible. Character doesn't exist."),
+ STRING},
{N_("Trade cancelled due to an unknown reason."), EMPTY},
{N_("Trade with %s cancelled."), STRING},
{N_("Unhandled trade cancel packet with %s"), STRING},
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp
index 6a0e1f252..e8c52276a 100644
--- a/src/notifymanager.cpp
+++ b/src/notifymanager.cpp
@@ -29,8 +29,6 @@
#include "net/net.h"
#include "net/partyhandler.h"
-#include "utils/gettext.h"
-
namespace NotifyManager
{
static ChatTab *getGuildTab()
@@ -88,6 +86,10 @@ namespace NotifyManager
player_node->setSpeech(gettext(info.text));
}
+ case INT:
+ case STRING:
+ case GUILD_STRING:
+ case PARTY_STRING:
default:
break;
}
@@ -130,6 +132,10 @@ namespace NotifyManager
chatLog(tab, strprintf(gettext(info.text), str.c_str()));
break;
}
+ case INT:
+ case GUILD:
+ case PARTY:
+ case SPEECH:
default:
break;
}
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index dbc314921..538d7274e 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -40,7 +40,7 @@ const int timeOut = 10;
#include <windows.h>
int execFileWait(std::string pathName, std::string name A_UNUSED,
- std::string arg1, std::string arg2, int waitTime)
+ std::string arg1, std::string arg2, int waitTime A_UNUSED)
{
// if (!waitTime)
// waitTime = timeOut;