diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
commit | 6d4da51f0fdcecc2d4398f60dbca43f499fdbe16 (patch) | |
tree | c71c7c6e49ed36a55c6b6a2b1ba70073300634dd /src/gui/widgets/tabbedarea.cpp | |
parent | 4125ac707288a244a7175b755d74dd963e762f56 (diff) | |
download | plus-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.gz plus-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.bz2 plus-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.xz plus-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.zip |
Fix code style in gui.
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index cd439a95a..5596bdd21 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -266,7 +266,7 @@ void TabbedArea::addTab(Image *const image, Widget *const widget) addTab(tab, widget); } -bool TabbedArea::isTabSelected(const unsigned int index) const +bool TabbedArea::isTabSelected(const size_t index) const { if (index >= mTabs.size()) return false; @@ -289,7 +289,7 @@ bool TabbedArea::isTabSelected(const Tab *const tab) const return mSelectedTab == tab; } -void TabbedArea::setSelectedTabByIndex(const unsigned int index) +void TabbedArea::setSelectedTabByIndex(const size_t index) { if (index >= mTabs.size()) return; @@ -383,14 +383,13 @@ void TabbedArea::mousePressed(MouseEvent &event) void TabbedArea::setSelectedTab(Tab *const tab) { - unsigned int i; - for (i = 0; i < mTabs.size(); i++) + for (size_t i = 0; i < mTabs.size(); i++) { if (mTabs[i].first == mSelectedTab) mWidgetContainer->remove(mTabs[i].second); } - for (i = 0; i < mTabs.size(); i++) + for (size_t i = 0; i < mTabs.size(); i++) { if (mTabs[i].first == tab) { @@ -518,7 +517,7 @@ void TabbedArea::updateVisibleTabsWidth() for (size_t i = mTabScrollIndex, sz = mTabs.size(); i < sz; ++i) { if (mTabs[i].first) - mVisibleTabsWidth += mTabs[i].first->getWidth(); + mVisibleTabsWidth += static_cast<int>(mTabs[i].first->getWidth()); } } @@ -616,7 +615,7 @@ void TabbedArea::action(const ActionEvent& actionEvent) } else if (eventId == "shift_right") { - if (mTabScrollIndex < mTabs.size() - 1) + if (static_cast<size_t>(mTabScrollIndex) < mTabs.size() - 1) ++mTabScrollIndex; } adjustTabPositions(); |