summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/characterviewnormal.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.cpp12
-rw-r--r--src/gui/widgets/tabs/socialnavigationtab.h2
3 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp
index d001a2175..b2ff5dff7 100644
--- a/src/gui/widgets/characterviewnormal.cpp
+++ b/src/gui/widgets/characterviewnormal.cpp
@@ -101,7 +101,7 @@ void CharacterViewNormal::resize()
if (sz == 0)
return;
const CharacterDisplay *const firtChar = (*mCharacterEntries)[0];
- int y = 0;
+ unsigned int y = 0;
const int width = firtChar->getWidth();
const int height = firtChar->getHeight();
int x = 0;
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 6e9fa5e19..37fb7637e 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -555,13 +555,14 @@ void TabbedArea::updateTabsWidth()
void TabbedArea::updateVisibleTabsWidth()
{
- mVisibleTabsWidth = 0;
+ unsigned int visibleTabsWidth = 0;
for (size_t i = mTabScrollIndex, sz = mTabs.size(); i < sz; ++i)
{
Tab *const tab = mTabs[i].first;
- if ((tab != nullptr) && tab->mVisible == Visible_true)
- mVisibleTabsWidth += CAST_S32(tab->getWidth());
+ if (tab != nullptr && tab->mVisible == Visible_true)
+ visibleTabsWidth += CAST_S32(tab->getWidth());
}
+ mVisibleTabsWidth = visibleTabsWidth;
}
void TabbedArea::adjustSize()
@@ -616,8 +617,9 @@ void TabbedArea::adjustTabPositions()
}
}
- int x = (mEnableScrollButtons && mArrowButton[0]->mVisible == Visible_true)
- ? mArrowButton[0]->getWidth() : 0;
+ unsigned int x = (mEnableScrollButtons &&
+ mArrowButton[0]->mVisible == Visible_true) ?
+ mArrowButton[0]->getWidth() : 0U;
for (size_t i = mTabScrollIndex; i < sz; ++i)
{
Tab *const tab = mTabs[i].first;
diff --git a/src/gui/widgets/tabs/socialnavigationtab.h b/src/gui/widgets/tabs/socialnavigationtab.h
index a3eb8f8b2..f58bc4200 100644
--- a/src/gui/widgets/tabs/socialnavigationtab.h
+++ b/src/gui/widgets/tabs/socialnavigationtab.h
@@ -175,7 +175,7 @@ class SocialNavigationTab final : public SocialTab
return;
const Avatar *const ava = avatars->at(num);
- if ((ava != nullptr) && (localPlayer != nullptr))
+ if (ava != nullptr)
localPlayer->navigateTo(ava->getX(), ava->getY());
}