summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-23 16:24:39 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-23 19:04:08 +0300
commitecc0dbab411d6f1f741dd19d0bc593ecc36a4941 (patch)
tree3e7cbd083fd2d8e25da0ec76b22e62310f1e42c1 /src/gui
parentbc4c9a33066e26bcdd3c564c90294777a839a5be (diff)
downloadmv-ecc0dbab411d6f1f741dd19d0bc593ecc36a4941.tar.gz
mv-ecc0dbab411d6f1f741dd19d0bc593ecc36a4941.tar.bz2
mv-ecc0dbab411d6f1f741dd19d0bc593ecc36a4941.tar.xz
mv-ecc0dbab411d6f1f741dd19d0bc593ecc36a4941.zip
fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp1
-rw-r--r--src/gui/palette.h6
-rw-r--r--src/gui/setup_theme.cpp4
-rw-r--r--src/gui/spellpopup.cpp1
-rw-r--r--src/gui/statuspopup.cpp1
-rw-r--r--src/gui/widgets/window.cpp3
-rw-r--r--src/gui/windowmenu.cpp3
7 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index ce2fcef98..f52902f4e 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -31,7 +31,6 @@
#include "gui/widgets/mouseevent.h"
#include "gui/widgets/window.h"
-#include "gui/widgets/windowcontainer.h"
#include "configuration.h"
#include "keydata.h"
diff --git a/src/gui/palette.h b/src/gui/palette.h
index 0c3c2dc87..a69a373b9 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -78,10 +78,10 @@ class Palette
*/
inline const gcn::Color &getColor(int type, int alpha = 255)
{
- if (type >= (signed)mColors.size())
+ if (type >= static_cast<signed>(mColors.size()))
{
- logger->log("incorrect color request type: %d from %ld",
- type, mColors.size());
+ logger->log("incorrect color request type: %d from %u",
+ type, static_cast<unsigned int>(mColors.size()));
type = 0;
}
gcn::Color* col = &mColors[type].color;
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index 4a8a1f296..5d34066e1 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -146,10 +146,10 @@ public:
virtual ~LangListModel()
{ }
- virtual int getNumberOfElements()
+ virtual int getNumberOfElements() override
{ return langs_count; }
- virtual std::string getElementAt(int i)
+ virtual std::string getElementAt(int i) override
{
if (i >= getNumberOfElements() || i < 0)
return _("???");
diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp
index 49eba7f43..4d9666be4 100644
--- a/src/gui/spellpopup.cpp
+++ b/src/gui/spellpopup.cpp
@@ -30,7 +30,6 @@
#include "gui/widgets/label.h"
-#include "graphics.h"
#include "units.h"
#include "utils/gettext.h"
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index ac222408b..183b7c02e 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -32,7 +32,6 @@
#include "gui/widgets/layout.h"
#include "gui/widgets/textbox.h"
-#include "graphics.h"
#include "inputmanager.h"
#include "localplayer.h"
#include "units.h"
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 879190932..95ceee0eb 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -948,7 +948,8 @@ int Window::getResizeHandles(const gcn::MouseEvent &event)
resizeHandles |= (y > mDimension.height - resizeBorderWidth)
? BOTTOM : (y < resizeBorderWidth) ? TOP : 0;
}
- if (x >= (unsigned)mGripRect.x && y >= (unsigned)mGripRect.y)
+ if (x >= static_cast<unsigned>(mGripRect.x)
+ && y >= static_cast<unsigned>(mGripRect.y))
{
mDragOffsetX = x;
mDragOffsetY = y;
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index e0bd1c843..ad4c6970a 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -67,7 +67,8 @@ WindowMenu::WindowMenu() :
mHaveMouse(false),
mAutoHide(1)
{
- int x = 0, h = 0;
+ int x = 0;
+ int h = 0;
setFocusable(false);