summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buydialog.cpp12
-rw-r--r--src/gui/sdlfont.cpp5
-rw-r--r--src/gui/socialwindow.cpp2
-rw-r--r--src/gui/whoisonline.cpp1
-rw-r--r--src/gui/widgets/itemcontainer.cpp10
-rw-r--r--src/gui/widgets/setuptab.cpp5
-rw-r--r--src/gui/widgets/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/setuptouchitem.cpp2
8 files changed, 19 insertions, 20 deletions
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index 2fc49d240..40e7648a6 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -78,7 +78,7 @@ public:
}
};
-static class SortItemPriceFunctor final
+static const class SortItemPriceFunctor final
{
public:
bool operator() (const ShopItem *const item1,
@@ -95,7 +95,7 @@ static class SortItemPriceFunctor final
}
} itemPriceSorter;
-static class SortItemNameFunctor final
+static const class SortItemNameFunctor final
{
public:
bool operator() (const ShopItem *const item1,
@@ -112,7 +112,7 @@ static class SortItemNameFunctor final
}
} itemNameSorter;
-static class SortItemIdFunctor final
+static const class SortItemIdFunctor final
{
public:
bool operator() (const ShopItem *const item1,
@@ -129,7 +129,7 @@ static class SortItemIdFunctor final
}
} itemIdSorter;
-static class SortItemWeightFunctor final
+static const class SortItemWeightFunctor final
{
public:
bool operator() (const ShopItem *const item1,
@@ -146,7 +146,7 @@ static class SortItemWeightFunctor final
}
} itemWeightSorter;
-static class SortItemAmountFunctor final
+static const class SortItemAmountFunctor final
{
public:
bool operator() (const ShopItem *const item1,
@@ -163,7 +163,7 @@ static class SortItemAmountFunctor final
}
} itemAmountSorter;
-static class SortItemTypeFunctor final
+static const class SortItemTypeFunctor final
{
public:
bool operator() (const ShopItem *const item1,
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index a205bbdc0..3a8f4a0b8 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -79,8 +79,6 @@ class SDLTextChunk final
SDL_Surface *surface = TTF_RenderUTF8_Blended(
font, strBuf, sdlCol);
- const int width = surface->w;
- const int height = surface->h;
if (!surface)
{
@@ -89,6 +87,9 @@ class SDLTextChunk final
return;
}
+ const int width = surface->w;
+ const int height = surface->h;
+
if (color.r != color2.r || color.g != color2.g
|| color.b != color2.b)
{ // outlining
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index f3b907cb2..2abdf8286 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -54,7 +54,7 @@
#include "debug.h"
-class SortFriendsFunctor final
+static const class SortFriendsFunctor final
{
public:
bool operator() (const Avatar *const m1, const Avatar *const m2) const
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 170f5ba9e..ed3d038a7 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -44,7 +44,6 @@
#include "net/net.h"
#include "net/playerhandler.h"
-#include "utils/dtor.h"
#include "utils/gettext.h"
#include <SDL.h>
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index e11e27fd6..0764aee08 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -62,7 +62,7 @@ class ItemIdPair final
Item* mItem;
};
-class SortItemAlphaFunctor final
+static const class SortItemAlphaFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -76,7 +76,7 @@ class SortItemAlphaFunctor final
}
} itemAlphaSorter;
-class SortItemIdFunctor final
+static const class SortItemIdFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -89,7 +89,7 @@ class SortItemIdFunctor final
}
} itemIdSorter;
-class SortItemWeightFunctor final
+static const class SortItemWeightFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -109,7 +109,7 @@ class SortItemWeightFunctor final
}
} itemWeightSorter;
-class SortItemAmountFunctor final
+static const class SortItemAmountFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -129,7 +129,7 @@ class SortItemAmountFunctor final
}
} itemAmountSorter;
-class SortItemTypeFunctor final
+static const class SortItemTypeFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
diff --git a/src/gui/widgets/setuptab.cpp b/src/gui/widgets/setuptab.cpp
index 227b74d98..9aeec73dc 100644
--- a/src/gui/widgets/setuptab.cpp
+++ b/src/gui/widgets/setuptab.cpp
@@ -22,13 +22,12 @@
#include "gui/widgets/setuptab.h"
-#include "logger.h"
-
#include "debug.h"
SetupTab::SetupTab(const Widget2 *const widget) :
Container(widget),
- gcn::ActionListener()
+ gcn::ActionListener(),
+ gcn::WidgetListener()
{
setOpaque(false);
addWidgetListener(this);
diff --git a/src/gui/widgets/setuptabscroll.cpp b/src/gui/widgets/setuptabscroll.cpp
index 64060aaad..89077dd8c 100644
--- a/src/gui/widgets/setuptabscroll.cpp
+++ b/src/gui/widgets/setuptabscroll.cpp
@@ -119,7 +119,7 @@ void SetupTabScroll::externalUpdated()
}
}
-void SetupTabScroll::widgetResized(const gcn::Event &event)
+void SetupTabScroll::widgetResized(const gcn::Event &event A_UNUSED)
{
mScroll->setWidth(getWidth() - 12);
mScroll->setHeight(getHeight() - 12 - 12);
diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp
index 8f8ec500c..e75b0a724 100644
--- a/src/gui/widgets/setuptouchitem.cpp
+++ b/src/gui/widgets/setuptouchitem.cpp
@@ -27,7 +27,7 @@
#include "debug.h"
-class SortTouchActionFunctor final
+static const class SortTouchActionFunctor final
{
public:
bool operator() (const SetupActionData *const data1,