summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actorsprite.cpp5
-rw-r--r--src/gui/npcdialog.cpp2
-rw-r--r--src/gui/setup_input.cpp3
-rw-r--r--src/gui/widgets/window.cpp3
-rw-r--r--src/inputmanager.h2
-rw-r--r--src/map.cpp2
-rw-r--r--src/mobileopenglgraphics.cpp1
-rw-r--r--src/mobileopenglgraphics.h1
-rw-r--r--src/utils/sdlcheckutils.cpp4
-rw-r--r--src/utils/sdlcheckutils.h4
10 files changed, 14 insertions, 13 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 83f104867..0b624741a 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -367,14 +367,15 @@ void ActorSprite::initTargetCursor()
{
static const std::string targetCursorFile = "%s/target-cursor-%s-%s.xml";
- const char *path = branding.getStringValue("guiPath").c_str();
+ const std::string path = branding.getStringValue("guiPath");
+
// Load target cursors
for (int size = TC_SMALL; size < NUM_TC; size++)
{
for (int type = TCT_NORMAL; type < NUM_TCT; type++)
{
targetCursor[type][size] = AnimatedSprite::load(strprintf(
- targetCursorFile.c_str(), path, cursorType(type),
+ targetCursorFile.c_str(), path.c_str(), cursorType(type),
cursorSize(size)));
}
}
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 27a5dbf43..22cecebd2 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -336,6 +336,7 @@ void NpcDialog::action(const gcn::ActionEvent &event)
return;
printText = mTextField->getText();
Net::getNpcHandler()->stringInput(mNpcId, printText);
+ break;
}
case NPC_INPUT_INTEGER:
{
@@ -344,6 +345,7 @@ void NpcDialog::action(const gcn::ActionEvent &event)
printText = strprintf("%d", mIntField->getValue());
Net::getNpcHandler()->integerInput(
mNpcId, mIntField->getValue());
+ break;
}
case NPC_INPUT_ITEM:
{
diff --git a/src/gui/setup_input.cpp b/src/gui/setup_input.cpp
index d4d86ce61..0b0fd70de 100644
--- a/src/gui/setup_input.cpp
+++ b/src/gui/setup_input.cpp
@@ -104,6 +104,7 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
// TRANSLATORS: button in input settings tab
mResetKeysButton(new Button(this, _("Reset all keys"), "resetkeys", this)),
mTabs(new TabStrip(this, config.getIntValue("fontSize") + 10)),
+ mScrollArea(new ScrollArea(mKeyList, true, "setup_input_background.xml")),
mKeySetting(false),
mActionDataSize(new int [9])
{
@@ -125,8 +126,6 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
refreshKeys();
mKeyList->addActionListener(this);
- mScrollArea = new ScrollArea(mKeyList,
- true, "setup_input_background.xml");
mScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mAssignKeyButton->addActionListener(this);
mAssignKeyButton->setEnabled(false);
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index a0683fa45..7d6174311 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -494,7 +494,8 @@ void Window::widgetResized(const gcn::Event &event A_UNUSED)
}
if (mSkin)
{
- const bool showClose = mCloseWindowButton && mSkin->getCloseImage(false);
+ const bool showClose = mCloseWindowButton
+ && mSkin->getCloseImage(false);
const int closePadding = getOption("closePadding");
if (showClose)
{
diff --git a/src/inputmanager.h b/src/inputmanager.h
index 3e2ab8e41..d8b39f6b8 100644
--- a/src/inputmanager.h
+++ b/src/inputmanager.h
@@ -82,7 +82,7 @@ enum KeyCondition
COND_NOMODAL = 64, // modal windows inactive
COND_NONPCINPUT = 128, // npc input field inactive
COND_EMODS = 256, // game modifiers enabled
- COND_NOTARGET = 512, // no target/untarget keys
+ COND_NOTARGET = 512, // no target/untarget keys
// pressed
COND_NOFOLLOW = 1024, // follow mode disabled
COND_INGAME = 2048, // game must be started
diff --git a/src/map.cpp b/src/map.cpp
index 011a19319..f7082383b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1447,7 +1447,6 @@ void Map::reduce()
{
return;
}
-#endif
int cnt = 0;
for (int x = 0; x < mWidth; x ++)
@@ -1567,6 +1566,7 @@ void Map::reduce()
}
}
logger->log("tiles reduced: %d", cnt);
+#endif
}
void Map::redrawMap()
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp
index ee9761215..fab5bfab3 100644
--- a/src/mobileopenglgraphics.cpp
+++ b/src/mobileopenglgraphics.cpp
@@ -52,7 +52,6 @@ MobileOpenGLGraphics::MobileOpenGLGraphics():
mIntTexArray(nullptr),
mIntVertArray(nullptr),
mShortVertArray(nullptr),
- mAlpha(false),
mTexture(false),
mIsByteColor(false),
mByteColor(),
diff --git a/src/mobileopenglgraphics.h b/src/mobileopenglgraphics.h
index 307ff5f2f..87755b9ff 100644
--- a/src/mobileopenglgraphics.h
+++ b/src/mobileopenglgraphics.h
@@ -214,7 +214,6 @@ class MobileOpenGLGraphics final : public Graphics
GLint *mIntTexArray;
GLint *mIntVertArray;
GLshort *mShortVertArray;
- bool mAlpha;
bool mTexture;
bool mIsByteColor;
diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp
index ee2f41b77..50adedb28 100644
--- a/src/utils/sdlcheckutils.cpp
+++ b/src/utils/sdlcheckutils.cpp
@@ -185,8 +185,8 @@ SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *const font,
}
SDL_Surface *FakeSDL_DisplayFormat(SDL_Surface *const surface,
- const char *const file,
- const unsigned line)
+ const char *const file,
+ const unsigned line)
{
return addSurface("SDL_DisplayFormat",
SDL_DisplayFormat(surface), file, line);
diff --git a/src/utils/sdlcheckutils.h b/src/utils/sdlcheckutils.h
index 5bfdad3ed..b1f1a0821 100644
--- a/src/utils/sdlcheckutils.h
+++ b/src/utils/sdlcheckutils.h
@@ -68,8 +68,8 @@ SDL_Surface *FakeSDL_DisplayFormat(SDL_Surface *const surface,
const unsigned line);
SDL_Surface *FakeSDL_DisplayFormatAlpha(SDL_Surface *const surface,
- const char *const file,
- const unsigned line);
+ const char *const file,
+ const unsigned line);
#endif // DEBUG_SDL_SURFACES
#endif // UTILS_SDLCHECKUTILS_H