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/setup_interface.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/setup_interface.cpp')
-rw-r--r-- | src/gui/setup_interface.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/setup_interface.cpp b/src/gui/setup_interface.cpp index b35a30fe..619a250c 100644 --- a/src/gui/setup_interface.cpp +++ b/src/gui/setup_interface.cpp @@ -65,14 +65,14 @@ const char *SIZE_NAME[4] = class FontSizeChoiceListModel : public gcn::ListModel { public: - virtual ~FontSizeChoiceListModel() { } + ~FontSizeChoiceListModel() override { } - virtual int getNumberOfElements() + int getNumberOfElements() override { return 4; } - virtual std::string getElementAt(int i) + std::string getElementAt(int i) override { if (i >= getNumberOfElements()) return _("???"); @@ -120,7 +120,7 @@ Setup_Interface::Setup_Interface(): setName(_("Interface")); // Create widgets - Spacer *space = new Spacer(0,10); + auto *space = new Spacer(0,10); mShowMonsterDamageCheckBox = new CheckBox(_("Show damage"), mShowMonsterDamageEnabled); @@ -260,7 +260,7 @@ void Setup_Interface::action(const gcn::ActionEvent &event) } else if (id == "speech") { - Being::Speech val = (Being::Speech)mSpeechSlider->getValue(); + auto val = (Being::Speech)mSpeechSlider->getValue(); mSpeechLabel->setCaption(speechModeToString(val)); mSpeechSlider->setValue(val); config.setValue("speech", val); |