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/charselectdialog.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/charselectdialog.cpp')
-rw-r--r-- | src/gui/charselectdialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index dff648ec..e4d5f371 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -74,7 +74,7 @@ class CharDeleteConfirm : public ConfirmDialog { } - void action(const gcn::ActionEvent &event) + void action(const gcn::ActionEvent &event) override { if (event.getId() == "yes") mMaster->attemptCharacterDelete(mIndex); @@ -97,7 +97,7 @@ class CharacterDisplay : public Container Net::Character *getCharacter() const { return mCharacter; } - void requestFocus(); + void requestFocus() override; void setActive(bool active); @@ -117,8 +117,8 @@ class CharacterDisplay : public Container CharSelectDialog::CharSelectDialog(LoginData *loginData): Window(_("Account and Character Management")), mLocked(false), - mUnregisterButton(0), - mChangeEmailButton(0), + mUnregisterButton(nullptr), + mChangeEmailButton(nullptr), mCharacterEntries(0), mLoginData(loginData), mCharHandler(Net::getCharHandler()) @@ -203,7 +203,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) && !mCharacterEntries[selected]->getCharacter()) { // Start new character dialog - CharCreateDialog *charCreateDialog = + auto *charCreateDialog = new CharCreateDialog(this, selected); mCharHandler->setCharCreateDialog(charCreateDialog); } @@ -273,7 +273,7 @@ void CharSelectDialog::setCharacters(const Net::Characters &characters) std::vector<CharacterDisplay*>::iterator iter, iter_end; for (iter = mCharacterEntries.begin(), iter_end = mCharacterEntries.end(); iter != iter_end; ++iter) - (*iter)->setCharacter(0); + (*iter)->setCharacter(nullptr); Net::Characters::const_iterator i, i_end = characters.end(); for (i = characters.begin(); i != i_end; ++i) @@ -347,7 +347,7 @@ bool CharSelectDialog::selectByName(const std::string &name, CharacterDisplay::CharacterDisplay(CharSelectDialog *charSelectDialog): - mCharacter(0), + mCharacter(nullptr), mPlayerBox(new PlayerBox) { mButton = new Button("", "go", charSelectDialog); @@ -376,7 +376,7 @@ void CharacterDisplay::setCharacter(Net::Character *character) return; mCharacter = character; - mPlayerBox->setPlayer(character ? character->dummy : 0); + mPlayerBox->setPlayer(character ? character->dummy : nullptr); update(); } |