summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.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/inventorywindow.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/inventorywindow.h')
-rw-r--r--src/gui/inventorywindow.h22
1 files changed, 11 insertions, 11 deletions
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<InventoryWindow*> WindowList;
+ using WindowList = std::list<InventoryWindow *>;
static WindowList instances;
Inventory *mInventory;