summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shopwindow.cpp2
-rw-r--r--src/gui/socialwindow.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp13
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
4 files changed, 8 insertions, 11 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 0119bc68b..0ed8065ae 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -817,7 +817,7 @@ bool ShopWindow::findShopItem(const ShopItem *const shopItem, const int mode)
if (!item)
continue;
- if (item && item->getId() == shopItem->getId()
+ if (item->getId() == shopItem->getId()
&& item->getPrice() == shopItem->getPrice()
&& item->getQuantity() >= shopItem->getQuantity())
{
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 10eb2596e..3c65358ea 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -876,7 +876,7 @@ public:
if (!ava)
break;
- if (ava && ava->getX() == x && ava->getY() == y)
+ if (ava->getX() == x && ava->getY() == y)
{
delete ava;
avatars->erase(i);
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 16604d760..ec23fda38 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -588,16 +588,13 @@ void GuiTable::_setFocusHandler(gcn::FocusHandler* focusHandler)
gcn::Widget::_setFocusHandler(focusHandler);
- if (mModel)
+ for (int r = 0; r < mModel->getRows(); ++r)
{
- for (int r = 0; r < mModel->getRows(); ++r)
+ for (int c = 0; c < mModel->getColumns(); ++c)
{
- for (int c = 0; c < mModel->getColumns(); ++c)
- {
- gcn::Widget *const w = mModel->getElementAt(r, c);
- if (w)
- w->_setFocusHandler(focusHandler);
- }
+ gcn::Widget *const w = mModel->getElementAt(r, c);
+ if (w)
+ w->_setFocusHandler(focusHandler);
}
}
}
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 82f7b82e4..a805aa5cc 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -379,7 +379,7 @@ void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
const gcn::Rectangle rect = w->getDimension();
if (rect.height != 0 && rect.height > height + 2)
{
- if (scr && scr->getVerticalScrollAmount()
+ if (scr->getVerticalScrollAmount()
>= scr->getVerticalMaxScroll() - 2
&& scr->getVerticalScrollAmount()
<= scr->getVerticalMaxScroll() + 2)