summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/widgets/itemcontainer.h
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/gui/widgets/itemcontainer.h')
-rw-r--r--src/gui/widgets/itemcontainer.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index aba12644..fe5b73e5 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -57,33 +57,33 @@ class ItemContainer : public gcn::Widget,
*/
ItemContainer(Inventory *inventory);
- virtual ~ItemContainer();
+ ~ItemContainer() override;
void hidePopup();
/**
* Necessary for checking how full the inventory is.
*/
- void logic();
+ void logic() override;
/**
* Draws the items.
*/
- void draw(gcn::Graphics *graphics);
+ void draw(gcn::Graphics *graphics) override;
// KeyListener
- void keyPressed(gcn::KeyEvent &event);
- void keyReleased(gcn::KeyEvent &event);
+ void keyPressed(gcn::KeyEvent &event) override;
+ void keyReleased(gcn::KeyEvent &event) override;
// MouseListener
- void mousePressed(gcn::MouseEvent &event);
- void mouseDragged(gcn::MouseEvent &event);
- void mouseReleased(gcn::MouseEvent &event);
- void mouseMoved(gcn::MouseEvent &event);
- void mouseExited(gcn::MouseEvent &event);
+ void mousePressed(gcn::MouseEvent &event) override;
+ void mouseDragged(gcn::MouseEvent &event) override;
+ void mouseReleased(gcn::MouseEvent &event) override;
+ void mouseMoved(gcn::MouseEvent &event) override;
+ void mouseExited(gcn::MouseEvent &event) override;
// WidgetListener
- void widgetResized(const gcn::Event &event);
+ void widgetResized(const gcn::Event &event) override;
/**
* Returns the selected item.
@@ -191,8 +191,8 @@ class ItemContainer : public gcn::Widget,
ItemPopup *mItemPopup;
- typedef std::list<gcn::SelectionListener*> SelectionListenerList;
- typedef SelectionListenerList::iterator SelectionListenerIterator;
+ using SelectionListenerList = std::list<gcn::SelectionListener *>;
+ using SelectionListenerIterator = SelectionListenerList::iterator;
SelectionListenerList mSelectionListeners;
};