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/customserverdialog.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/customserverdialog.cpp')
-rw-r--r-- | src/gui/customserverdialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp index e0d25928..733a6b5c 100644 --- a/src/gui/customserverdialog.cpp +++ b/src/gui/customserverdialog.cpp @@ -53,13 +53,13 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index): { setWindowName("CustomServerDialog"); - Label *nameLabel = new Label(_("Name:")); - Label *serverAdressLabel = new Label(_("Address:")); - Label *portLabel = new Label(_("Port:")); + auto *nameLabel = new Label(_("Name:")); + auto *serverAdressLabel = new Label(_("Address:")); + auto *portLabel = new Label(_("Port:")); #ifdef MANASERV_SUPPORT - Label *typeLabel = new Label(_("Server type:")); + auto *typeLabel = new Label(_("Server type:")); #endif - Label *descriptionLabel = new Label(_("Description:")); + auto *descriptionLabel = new Label(_("Description:")); mServerAddressField = new TextField(std::string()); mPortField = new TextField(std::string()); @@ -163,7 +163,7 @@ void CustomServerDialog::action(const gcn::ActionEvent &event) // Check the given information if (mServerAddressField->getText().empty()) { - OkDialog *dlg = new OkDialog(_("Error"), + auto *dlg = new OkDialog(_("Error"), _("Please type in at least the address of the server.")); dlg->addActionListener(this); } @@ -220,6 +220,6 @@ void CustomServerDialog::keyPressed(gcn::KeyEvent &keyEvent) } else if (key.getValue() == Key::ENTER) { - action(gcn::ActionEvent(NULL, mOkButton->getActionEventId())); + action(gcn::ActionEvent(nullptr, mOkButton->getActionEventId())); } } |