From 5afe88df2538274859a162ffd63ed52118e80c19 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 26 Jan 2024 16:07:54 +0100 Subject: Apply C++11 fixits modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using --- src/gui/widgets/itemcontainer.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gui/widgets/itemcontainer.h') 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 SelectionListenerList; - typedef SelectionListenerList::iterator SelectionListenerIterator; + using SelectionListenerList = std::list; + using SelectionListenerIterator = SelectionListenerList::iterator; SelectionListenerList mSelectionListeners; }; -- cgit v1.2.3-70-g09d2