diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-24 19:17:41 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-04-02 20:57:16 +0200 |
commit | 59919635523d41f3a15120c83db4b7d080c155de (patch) | |
tree | 0da989bd2342b5a53d49c26893a3a544e7432fcc /src/gui/itemamountwindow.cpp | |
parent | 7ea1c4574d6e845f95f2c4c3a1dd4a5d730bc6ba (diff) | |
download | mana-59919635523d41f3a15120c83db4b7d080c155de.tar.gz mana-59919635523d41f3a15120c83db4b7d080c155de.tar.bz2 mana-59919635523d41f3a15120c83db4b7d080c155de.tar.xz mana-59919635523d41f3a15120c83db4b7d080c155de.zip |
General code cleanups
* Removed some unused includes
* Removed unused ListBox::mFont
* Removed wrong cast to SDL_Scancode
* Removed superfluous .c_str()
* Removed superfluous explicit std::string construction
* Removed unused variable
* Use more emplace_back
* Turned FindBeingFunctor into a lambda
* Avoid needless pointer references for ambient layers and use a vector
Diffstat (limited to 'src/gui/itemamountwindow.cpp')
-rw-r--r-- | src/gui/itemamountwindow.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp index 285936a5..947b5bdc 100644 --- a/src/gui/itemamountwindow.cpp +++ b/src/gui/itemamountwindow.cpp @@ -79,7 +79,7 @@ void ItemAmountWindow::finish(Item *item, int amount, Usage usage) ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, int maxRange): - Window("", true, parent), + Window(std::string(), true, parent), mItem(item), mMax(maxRange), mUsage(usage) @@ -103,9 +103,8 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, mItemAmountSlide->setActionEventId("slide"); mItemAmountSlide->addActionListener(this); - //Item icon - Image *image = item->getImage(); - mItemIcon = new Icon(image); + // Item icon + mItemIcon = new Icon(item->getImage()); // Buttons auto *minusButton = new Button(_("-"), "dec", this); |