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/quitdialog.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/quitdialog.cpp')
-rw-r--r-- | src/gui/quitdialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 21c9fdc1..4262f9cc 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -37,7 +37,7 @@ #include <assert.h> QuitDialog::QuitDialog(QuitDialog** pointerToMe): - Window(_("Quit"), true, NULL), mMyPointer(pointerToMe) + Window(_("Quit"), true, nullptr), mMyPointer(pointerToMe) { mForceQuit = new RadioButton(_("Quit"), "quitdialog"); mLogoutQuit = new RadioButton(_("Quit"), "quitdialog"); @@ -90,7 +90,7 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe): QuitDialog::~QuitDialog() { - if (mMyPointer) *mMyPointer = NULL; + if (mMyPointer) *mMyPointer = nullptr; // Optional widgets, so delete them by hand. delete mForceQuit; delete mLogoutQuit; @@ -138,10 +138,10 @@ void QuitDialog::keyPressed(gcn::KeyEvent &keyEvent) switch (key.getValue()) { case Key::ENTER: - action(gcn::ActionEvent(NULL, mOkButton->getActionEventId())); + action(gcn::ActionEvent(nullptr, mOkButton->getActionEventId())); break; case Key::ESCAPE: - action(gcn::ActionEvent(NULL, mCancelButton->getActionEventId())); + action(gcn::ActionEvent(nullptr, mCancelButton->getActionEventId())); break; case Key::UP: dir = -1; @@ -153,7 +153,7 @@ void QuitDialog::keyPressed(gcn::KeyEvent &keyEvent) if (dir != 0) { - std::vector<gcn::RadioButton*>::iterator it = mOptions.begin(); + auto it = mOptions.begin(); for (; it < mOptions.end(); it++) { |