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/quitdialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/quitdialog.cpp') 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 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::iterator it = mOptions.begin(); + auto it = mOptions.begin(); for (; it < mOptions.end(); it++) { -- cgit v1.2.3-70-g09d2