diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/extendedlistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/listbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/shoplistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/staticbrowserbox.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_relations.cpp | 12 | ||||
-rw-r--r-- | src/gui/widgets/textfield.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index ab87076d9..7354dbabf 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -426,7 +426,7 @@ void BrowserBox::draw(Graphics *const graphics) if (mSelectedLink >= 0 && mSelectedLink < CAST_S32(mLinks.size())) { - if ((mHighlightMode & LinkHighlightMode::BACKGROUND) != 0u) + if ((mHighlightMode & LinkHighlightMode::BACKGROUND) != 0U) { BrowserLink &link = mLinks[CAST_SIZE(mSelectedLink)]; graphics->setColor(mHighlightColor); @@ -437,7 +437,7 @@ void BrowserBox::draw(Graphics *const graphics) link.y2 - link.y1)); } - if ((mHighlightMode & LinkHighlightMode::UNDERLINE) != 0u) + if ((mHighlightMode & LinkHighlightMode::UNDERLINE) != 0U) { BrowserLink &link = mLinks[CAST_SIZE(mSelectedLink)]; graphics->setColor(mHyperLinkColor); @@ -458,7 +458,7 @@ void BrowserBox::draw(Graphics *const graphics) continue; if (part.mY > yEnd) break; - if (part.mType == 0u) + if (part.mType == 0U) { if (part.mBold) { diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index ad597ee60..f3d7e7446 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -216,7 +216,7 @@ void EmoteShortcutContainer::mousePressed(MouseEvent &restrict event) restrict2 emoteShortcut->setEmote(index); emoteShortcut->setEmoteSelected(0); } - else if (emoteShortcut->getEmote(index) != 0u) + else if (emoteShortcut->getEmote(index) != 0U) { mEmoteClicked = true; } @@ -250,12 +250,12 @@ void EmoteShortcutContainer::mouseReleased(MouseEvent &restrict event) return; } - if (mEmoteMoved != 0u) + if (mEmoteMoved != 0U) { emoteShortcut->setEmotes(index, mEmoteMoved); mEmoteMoved = 0; } - else if ((emoteShortcut->getEmote(index) != 0u) && mEmoteClicked) + else if ((emoteShortcut->getEmote(index) != 0U) && mEmoteClicked) { emoteShortcut->useEmote(index + 1); } diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index dc8ead760..b15aee7d2 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -41,7 +41,7 @@ ExtendedListBox::ExtendedListBox(const Widget2 *const widget, mListItems(), mSelectedItems() { - if (rowHeight != 0u) + if (rowHeight != 0U) mRowHeight = rowHeight; } diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index e815a4ec8..5f13f9bc7 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -357,7 +357,7 @@ void ListBox::mouseDragged(MouseEvent &event) return; // Make list selection update on drag, but guard against negative y - if (getRowHeight() != 0u) + if (getRowHeight() != 0U) setSelected(std::max(0, getSelectionByMouse(event.getY()))); } diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index 8cc053699..d8f01a644 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -209,7 +209,7 @@ void ShopListBox::setPriceCheck(const bool check) void ShopListBox::mouseMoved(MouseEvent &event) { - if ((itemPopup == nullptr) || (mRowHeight == 0u)) + if ((itemPopup == nullptr) || (mRowHeight == 0U)) return; if (mShopItems == nullptr) diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp index cd67991b7..c4a705aa9 100644 --- a/src/gui/widgets/staticbrowserbox.cpp +++ b/src/gui/widgets/staticbrowserbox.cpp @@ -375,7 +375,7 @@ void StaticBrowserBox::draw(Graphics *const graphics) if (mSelectedLink >= 0 && mSelectedLink < CAST_S32(mLinks.size())) { - if ((mHighlightMode & LinkHighlightMode::BACKGROUND) != 0u) + if ((mHighlightMode & LinkHighlightMode::BACKGROUND) != 0U) { BrowserLink &link = mLinks[CAST_SIZE(mSelectedLink)]; graphics->setColor(mHighlightColor); @@ -386,7 +386,7 @@ void StaticBrowserBox::draw(Graphics *const graphics) link.y2 - link.y1)); } - if ((mHighlightMode & LinkHighlightMode::UNDERLINE) != 0u) + if ((mHighlightMode & LinkHighlightMode::UNDERLINE) != 0U) { BrowserLink &link = mLinks[CAST_SIZE(mSelectedLink)]; graphics->setColor(mHyperLinkColor); @@ -407,7 +407,7 @@ void StaticBrowserBox::draw(Graphics *const graphics) continue; if (part.mY > yEnd) break; - if (part.mType == 0u) + if (part.mType == 0U) { if (part.mBold) { diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 37fb7637e..59882966c 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -516,7 +516,7 @@ void TabbedArea::widgetResized(const Event &event A_UNUSED) innerWidth = 0; int newWidth = mVisibleTabsWidth; - while ((mTabScrollIndex != 0u) && newWidth < innerWidth) + while ((mTabScrollIndex != 0U) && newWidth < innerWidth) { Tab *const tab = mTabs[mTabScrollIndex - 1].first; if ((tab != nullptr) && tab->mVisible == Visible_true) @@ -659,7 +659,7 @@ void TabbedArea::action(const ActionEvent& actionEvent) const std::string &eventId = actionEvent.getId(); if (eventId == "shift_left") { - if (mTabScrollIndex != 0u) + if (mTabScrollIndex != 0U) --mTabScrollIndex; } else if (eventId == "shift_right") @@ -694,7 +694,7 @@ void TabbedArea::updateArrowEnableState() } // Left arrow consistency check - if (mTabScrollIndex == 0u) + if (mTabScrollIndex == 0U) mArrowButton[0]->setEnabled(false); else mArrowButton[0]->setEnabled(true); diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp index 85a861109..e89c2a3e0 100644 --- a/src/gui/widgets/tabs/setup_relations.cpp +++ b/src/gui/widgets/tabs/setup_relations.cpp @@ -71,11 +71,11 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) : mPlayerTable, Opaque_true, std::string())), // TRANSLATORS: relation dialog button mDefaultTrading(new CheckBox(this, _("Allow trading"), - (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u, + (playerRelations.getDefault() & PlayerRelation::TRADE) != 0U, nullptr, std::string())), // TRANSLATORS: relation dialog button mDefaultWhisper(new CheckBox(this, _("Allow whispers"), - (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u, + (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0U, nullptr, std::string())), // TRANSLATORS: relation dialog button mDeleteButton(new Button(this, _("Delete"), ACTION_DELETE, @@ -236,9 +236,9 @@ void Setup_Relations::updatedPlayer(const std::string &name A_UNUSED) { mPlayerTableModel->playerRelationsUpdated(); mDefaultTrading->setSelected( - (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u); + (playerRelations.getDefault() & PlayerRelation::TRADE) != 0U); mDefaultWhisper->setSelected( - (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u); + (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0U); if (localPlayer != nullptr) localPlayer->updateName(); } @@ -265,7 +265,7 @@ void Setup_Relations::updateAll() void Setup_Relations::externalUpdated() { mDefaultTrading->setSelected( - (playerRelations.getDefault() & PlayerRelation::TRADE) != 0u); + (playerRelations.getDefault() & PlayerRelation::TRADE) != 0U); mDefaultWhisper->setSelected( - (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0u); + (playerRelations.getDefault() & PlayerRelation::WHISPER) != 0U); } diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index b80404c73..adcb557d7 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -322,7 +322,7 @@ void TextField::keyPressed(KeyEvent &event) if (mNumeric) { if ((val >= '0' && val <= '9') || - (val == '-' && mCaretPosition == 0u)) + (val == '-' && mCaretPosition == 0U)) { char buf[2]; buf[0] = CAST_8(val); diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index cdc10f1af..3df552404 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -213,7 +213,7 @@ Window::Window(const std::string &caption, } setTitleBarHeight(CAST_U32( getOption("titlebarHeight", 0))); - if (mTitleBarHeight == 0u) + if (mTitleBarHeight == 0U) mTitleBarHeight = mCaptionFont->getHeight() + mPadding; mTitleBarHeight += getOption("titlebarHeightRelative", 0); |