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/serverdialog.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/serverdialog.h')
-rw-r--r-- | src/gui/serverdialog.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index cf9e62e7..d0ef0e55 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -50,19 +50,19 @@ class DropDown; class ServersListModel : public gcn::ListModel { public: - typedef std::pair<int, std::string> VersionString; + using VersionString = std::pair<int, std::string>; ServersListModel(ServerInfos *servers, ServerDialog *parent); /** * Used to get number of line in the list */ - int getNumberOfElements(); + int getNumberOfElements() override; /** * Used to get an element from the list */ - std::string getElementAt(int elementIndex); + std::string getElementAt(int elementIndex) override; /** * Used to get the corresponding Server struct @@ -73,7 +73,7 @@ class ServersListModel : public gcn::ListModel void setVersionString(int index, const std::string &version); private: - typedef std::vector<VersionString> VersionStrings; + using VersionStrings = std::vector<VersionString>; ServerInfos *mServers; VersionStrings mVersionStrings; @@ -93,23 +93,23 @@ class ServerDialog : public Window, public: ServerDialog(ServerInfo *serverInfo, const std::string &dir); - ~ServerDialog(); + ~ServerDialog() override; /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; /** * Called when the selected value changed in the servers list box. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; - void mouseClicked(gcn::MouseEvent &mouseEvent); + void mouseClicked(gcn::MouseEvent &mouseEvent) override; - void logic(); + void logic() override; protected: friend class ServersListModel; |