summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-15 20:21:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-15 20:21:16 +0300
commit516d635b6cbce6e38cc3e4f227f6ab0b073925b9 (patch)
tree61f4e9eab9bae255375e94c29d4663b5d8f217c5
parent0e7b238a3794a9d2bb8dbf66adfe65bf6f1f4046 (diff)
downloadmv-516d635b6cbce6e38cc3e4f227f6ab0b073925b9.tar.gz
mv-516d635b6cbce6e38cc3e4f227f6ab0b073925b9.tar.bz2
mv-516d635b6cbce6e38cc3e4f227f6ab0b073925b9.tar.xz
mv-516d635b6cbce6e38cc3e4f227f6ab0b073925b9.zip
Fix code style.
-rw-r--r--src/graphicsmanager.cpp2
-rw-r--r--src/graphicsmanager.h2
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_video.h2
-rw-r--r--src/gui/windows/itemamountwindow.cpp4
-rw-r--r--src/input/joystick.h2
-rw-r--r--src/net/ea/chatrecv.cpp4
-rw-r--r--src/net/ea/inventoryhandler.h2
-rw-r--r--src/resources/dye/dyepalette_unittest.cc1
-rw-r--r--src/resources/inventory/inventory.h1
-rw-r--r--src/resources/item/complexitem.cpp2
-rw-r--r--src/resources/item/complexitem.h2
-rw-r--r--src/text.cpp8
-rw-r--r--src/text.h6
-rw-r--r--src/utils/gettexthelper.cpp3
15 files changed, 22 insertions, 25 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 1c5d9f6c9..5ecc96fcc 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -809,7 +809,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
}
}
-void GraphicsManager::updateTextureFormat() const
+void GraphicsManager::updateTextureFormat()
{
const int renderer = settings.options.renderer;
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index 816235ee9..3651bcc77 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -96,7 +96,7 @@ class GraphicsManager final
bool supportExtension(const std::string &ext) const A_WARN_UNUSED;
- void updateTextureFormat() const;
+ static void updateTextureFormat();
void updateTextureCompressionFormat() const;
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index c46954f20..761ee93e4 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -51,11 +51,11 @@
MapDebugTab::MapDebugTab(const Widget2 *const widget) :
DebugTab(widget),
// TRANSLATORS: debug window label
- mMusicFileLabel(new Label(this, strprintf(_("Music:")))),
+ mMusicFileLabel(new Label(this, _("Music:"))),
// TRANSLATORS: debug window label
- mMapLabel(new Label(this, strprintf(_("Map:")))),
+ mMapLabel(new Label(this, _("Map:"))),
// TRANSLATORS: debug window label
- mMinimapLabel(new Label(this, strprintf(_("Minimap:")))),
+ mMinimapLabel(new Label(this, _("Minimap:"))),
mTileMouseLabel(new Label(this, strprintf("%s (%d, %d)",
// TRANSLATORS: debug window label
_("Cursor:"), 0, 0))),
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index 9bff510bc..e1a94557e 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -68,7 +68,7 @@ class Setup_Video final : public SetupTab,
Label *mFpsLabel;
Slider *mAltFpsSlider;
Label *mAltFpsLabel;
-#if !defined(ANDROID) && !defined(__APPLE__) || !defined(__native_client__)
+#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
Button *mDetectButton;
#endif
TextDialog *mDialog;
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 5bd7da12e..cefeaca7b 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -264,6 +264,10 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage,
// TRANSLATORS: amount window message
setCaption(_("Select amount of items to send."));
break;
+ case CraftAdd:
+ // TRANSLATORS: amount window message
+ setCaption(_("Select amount of items to craft."));
+ break;
#endif
case CartAdd:
// TRANSLATORS: amount window message
diff --git a/src/input/joystick.h b/src/input/joystick.h
index 626e0f2b5..ee4b9de20 100644
--- a/src/input/joystick.h
+++ b/src/input/joystick.h
@@ -74,7 +74,7 @@ class Joystick final
void close();
- bool isEnabled() const A_WARN_UNUSED
+ static bool isEnabled() A_WARN_UNUSED
{ return mEnabled; }
void setNumber(const int n);
diff --git a/src/net/ea/chatrecv.cpp b/src/net/ea/chatrecv.cpp
index ff9f3c619..9a49e6f94 100644
--- a/src/net/ea/chatrecv.cpp
+++ b/src/net/ea/chatrecv.cpp
@@ -111,8 +111,8 @@ void ChatRecv::processWhisperResponseContinue(Net::MessageIn &msg,
{
chatWindow->addWhisper(nick,
// TRANSLATORS: chat message
- strprintf(_("Whisper could not "
- "be sent, you ignored by all players.")),
+ _("Whisper could not "
+ "be sent, you ignored by all players."),
ChatMsgType::BY_SERVER);
}
break;
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index 695d5904f..31a755b42 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -25,8 +25,6 @@
#include "localconsts.h"
-#include "enums/simpletypes/beingid.h"
-
#include "net/inventoryhandler.h"
#include <queue>
diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc
index 5654a4a08..1393070ea 100644
--- a/src/resources/dye/dyepalette_unittest.cc
+++ b/src/resources/dye/dyepalette_unittest.cc
@@ -356,5 +356,4 @@ TEST_CASE("DyePalette tests")
REQUIRE(palette.mColors[0].value[2] == 46);
REQUIRE(palette.mColors[0].value[3] == 0x77);
}
-
}
diff --git a/src/resources/inventory/inventory.h b/src/resources/inventory/inventory.h
index 9186fbd73..6b8253857 100644
--- a/src/resources/inventory/inventory.h
+++ b/src/resources/inventory/inventory.h
@@ -38,7 +38,6 @@
#include "utils/intmap.h"
#include <list>
-#include <string>
#include "localconsts.h"
diff --git a/src/resources/item/complexitem.cpp b/src/resources/item/complexitem.cpp
index 95e30ac54..3d50d62e5 100644
--- a/src/resources/item/complexitem.cpp
+++ b/src/resources/item/complexitem.cpp
@@ -20,8 +20,6 @@
#include "resources/item/complexitem.h"
-#include "logger.h"
-
#include "utils/dtor.h"
#include "debug.h"
diff --git a/src/resources/item/complexitem.h b/src/resources/item/complexitem.h
index 9515e13f5..b567c49e8 100644
--- a/src/resources/item/complexitem.h
+++ b/src/resources/item/complexitem.h
@@ -23,8 +23,6 @@
#include "resources/item/item.h"
-#include <vector>
-
#include "localconsts.h"
/**
diff --git a/src/text.cpp b/src/text.cpp
index f5a324419..9796877cf 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -178,10 +178,10 @@ void Text::draw(Graphics *const graphics, const int xOff, const int yOff)
BLOCK_END("Text::draw")
}
-int Text::getWidth()
-{
- return mTextChunk.img->getWidth();
-}
+//int Text::getWidth()
+//{
+// return mTextChunk.img->getWidth();
+//}
FlashText::FlashText(const std::string &text,
const int x, const int y,
diff --git a/src/text.h b/src/text.h
index e390a9547..660a2df3b 100644
--- a/src/text.h
+++ b/src/text.h
@@ -76,12 +76,12 @@ class Text notfinal
virtual void draw(Graphics *const graphics,
const int xOff, const int yOff) A_NONNULL(2);
- int getWidth() A_WARN_UNUSED;
+// int getWidth() A_WARN_UNUSED;
- int getX() A_WARN_UNUSED
+ int getX() const A_WARN_UNUSED
{ return mX; }
- int getY() A_WARN_UNUSED
+ int getY() const A_WARN_UNUSED
{ return mY; }
private:
diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp
index 2de5589dc..3ee1bb0b3 100644
--- a/src/utils/gettexthelper.cpp
+++ b/src/utils/gettexthelper.cpp
@@ -20,7 +20,9 @@
#include "utils/gettexthelper.h"
+#if defined(ENABLE_NLS) || defined(ENABLE_CUSTOMNLS)
#include "configuration.h"
+#endif
#ifdef ENABLE_NLS
#include "client.h"
@@ -77,7 +79,6 @@ static std::string setLangEnv()
setEnv("LANGUAGE", lang.c_str());
}
#endif // WIN32
-
}
return lang;