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/setup_interface.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/setup_interface.cpp') 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); -- cgit v1.2.3-70-g09d2