diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/npcdialog.h | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-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/npcdialog.h')
-rw-r--r-- | src/gui/npcdialog.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index 9c6839b0..49ec5f8a 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -52,12 +52,12 @@ class NpcDialog : public Window, public: NpcDialog(int npcId); - ~NpcDialog(); + ~NpcDialog() override; /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Sets the text shows in the dialog. @@ -94,17 +94,17 @@ class NpcDialog : public Window, * Notifies the server that the client has performed a close action. * @overrides Window::close() */ - void close(); + void close() override; /** * Returns the number of items in the choices list. */ - int getNumberOfElements(); + int getNumberOfElements() override; /** * Returns the name of item number i of the choices list. */ - std::string getElementAt(int i); + std::string getElementAt(int i) override; /** * Makes this dialog request a choice selection from the user. @@ -144,13 +144,13 @@ class NpcDialog : public Window, * * @param event The calling event */ - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void setVisible(bool visible); + void setVisible(bool visible) override; - void event(Event::Channel channel, const Event &event); + void event(Event::Channel channel, const Event &event) override; - void mouseClicked(gcn::MouseEvent &mouseEvent); + void mouseClicked(gcn::MouseEvent &mouseEvent) override; /** * Returns the first active instance. Useful for pushing user @@ -169,7 +169,7 @@ class NpcDialog : public Window, static void setup(); private: - typedef std::list<NpcDialog*> DialogList; + using DialogList = std::list<NpcDialog *>; static DialogList instances; void buildLayout(); |