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/inventorywindow.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/gui/inventorywindow.h') diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 39876e53..389312b3 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -54,12 +54,12 @@ class InventoryWindow : public Window, public: InventoryWindow(Inventory *inventory); - ~InventoryWindow(); + ~InventoryWindow() override; /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Returns the selected item. @@ -69,27 +69,27 @@ class InventoryWindow : public Window, /** * Handles closing of the window */ - virtual void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; /** * Handles the mouse clicks. */ - void mouseClicked(gcn::MouseEvent &event); + void mouseClicked(gcn::MouseEvent &event) override; /** * Handles the key presses. */ - void keyPressed(gcn::KeyEvent &event); + void keyPressed(gcn::KeyEvent &event) override; /** * Handles the key releases. */ - void keyReleased(gcn::KeyEvent &event); + void keyReleased(gcn::KeyEvent &event) override; /** * Updates labels to currently selected item. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Sets whether the split button should be shown. @@ -100,7 +100,7 @@ class InventoryWindow : public Window, * Closes the Storage Window, as well as telling the server that the * window has been closed. */ - void close(); + void close() override; /** * Updates the buttons. @@ -111,11 +111,11 @@ class InventoryWindow : public Window, static bool isAnyInputFocused(); - void slotsChanged(Inventory* inventory); + void slotsChanged(Inventory* inventory) override; bool isMainInventory() { return mInventory->isMainInventory(); } - void event(Event::Channel channel, const Event &event); + void event(Event::Channel channel, const Event &event) override; private: /** @@ -124,7 +124,7 @@ class InventoryWindow : public Window, void updateWeight(); - typedef std::list WindowList; + using WindowList = std::list; static WindowList instances; Inventory *mInventory; -- cgit v1.2.3-60-g2f50