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/statuswindow.cpp | |
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/statuswindow.cpp')
-rw-r--r-- | src/gui/statuswindow.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 430d47ed..eee832ec 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -54,7 +54,7 @@ class AttrDisplay : public Container DERIVED, CHANGEABLE, UNKNOWN }; - ~AttrDisplay(); + ~AttrDisplay() override; virtual std::string update(); virtual Type getType() { return UNKNOWN; } @@ -73,19 +73,19 @@ class DerDisplay : public AttrDisplay { public: DerDisplay(int id, const std::string &name); - virtual Type getType() { return DERIVED; } + Type getType() override { return DERIVED; } }; class ChangeDisplay : public AttrDisplay, gcn::ActionListener { public: ChangeDisplay(int id, const std::string &name); - std::string update(); - virtual Type getType() { return CHANGEABLE; } + std::string update() override; + Type getType() override { return CHANGEABLE; } void setPointsNeeded(int needed); private: - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; int mNeeded; @@ -284,7 +284,7 @@ void StatusWindow::event(Event::Channel channel, } else { - Attrs::iterator it = mAttrs.find(id); + auto it = mAttrs.find(id); if (it != mAttrs.end()) { it->second->update(); @@ -301,7 +301,7 @@ void StatusWindow::event(Event::Channel channel, void StatusWindow::updateAttrs() { - for (Attrs::iterator it = mAttrs.begin(); it != mAttrs.end(); it++) + for (auto it = mAttrs.begin(); it != mAttrs.end(); it++) { it->second->update(); } @@ -309,7 +309,7 @@ void StatusWindow::updateAttrs() void StatusWindow::setPointsNeeded(int id, int needed) { - Attrs::iterator it = mAttrs.find(id); + auto it = mAttrs.find(id); if (it != mAttrs.end()) { @@ -481,7 +481,7 @@ ChangeDisplay::ChangeDisplay(int id, const std::string &name): } else { - mDec = 0; + mDec = nullptr; } update(); |