summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-11 18:09:33 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-11 18:09:33 +0300
commit17dcb835103ac05012c5a7eafa8c7702cef53390 (patch)
tree422c28adfba13f2161fcfc36943a3903e531490b /src/gui/widgets
parent84d53b7bb98bb44696ed1bc2c3f132e51394ac00 (diff)
downloadmv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.gz
mv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.bz2
mv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.xz
mv-17dcb835103ac05012c5a7eafa8c7702cef53390.zip
Add some fixes after automatic checks.
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;
/**