summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/shopitems.cpp4
-rw-r--r--src/gui/widgets/shoplistbox.cpp4
-rw-r--r--src/gui/widgets/shoplistbox.h2
5 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index bbd31cee7..93c65e356 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -536,7 +536,7 @@ int BrowserBox::calcHeight()
{
const signed char c = row.at(start + 2);
- bool valid;
+ bool valid(false);
const gcn::Color col[2] =
{
getThemeCharColor(c, valid),
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 8b6722a59..e40248121 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -382,7 +382,7 @@ void GuiTable::draw(gcn::Graphics* graphics)
if (mTopWidget)
{
- const gcn::Rectangle bounds = mTopWidget->getDimension();
+ const gcn::Rectangle &bounds = mTopWidget->getDimension();
graphics->pushClipArea(bounds);
mTopWidget->draw(graphics);
graphics->popClipArea();
diff --git a/src/gui/widgets/shopitems.cpp b/src/gui/widgets/shopitems.cpp
index f97767064..22049e944 100644
--- a/src/gui/widgets/shopitems.cpp
+++ b/src/gui/widgets/shopitems.cpp
@@ -116,13 +116,11 @@ void ShopItems::clear()
ShopItem *ShopItems::findItem(const int id, const unsigned char color) const
{
- ShopItem *item;
-
std::vector<ShopItem*>::const_iterator it = mShopItems.begin();
const std::vector<ShopItem*>::const_iterator e = mShopItems.end();
while (it != e)
{
- item = *(it);
+ ShopItem *const item = *it;
if (item->getId() == id && item->getColor() == color)
return item;
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index d2868f3d2..45891f202 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -73,10 +73,6 @@ ShopListBox::ShopListBox(const Widget2 *const widget,
mForegroundColor = getThemeColor(Theme::LISTBOX);
}
-void ShopListBox::init()
-{
-}
-
void ShopListBox::setPlayersMoney(const int money)
{
mPlayerMoney = money;
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index 16f54e78a..ad58ea413 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -85,8 +85,6 @@ class ShopListBox final : public ListBox
void mouseExited(gcn::MouseEvent& mouseEvent) override;
private:
- void init();
-
int mPlayerMoney;
/**