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/windowmenu.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/windowmenu.cpp')
-rw-r--r-- | src/gui/windowmenu.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index 9a53479e..5b13d0f3 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -46,7 +46,7 @@ extern Window *statusWindow; extern Window *socialWindow; WindowMenu::WindowMenu(): - mEmotePopup(0) + mEmotePopup(nullptr) { int x = 0, h = 0; @@ -84,7 +84,7 @@ WindowMenu::~WindowMenu() void WindowMenu::action(const gcn::ActionEvent &event) { - Window *window = 0; + Window *window = nullptr; if (event.getId() == ":-)") { @@ -104,7 +104,7 @@ void WindowMenu::action(const gcn::ActionEvent &event) else { windowContainer->scheduleDelete(mEmotePopup); - mEmotePopup = 0; + mEmotePopup = nullptr; } } else if (event.getId() == "Status") @@ -159,7 +159,7 @@ void WindowMenu::valueChanged(const gcn::SelectionEvent &event) Net::getPlayerHandler()->emote(emote); windowContainer->scheduleDelete(mEmotePopup); - mEmotePopup = 0; + mEmotePopup = nullptr; } } @@ -180,7 +180,7 @@ void WindowMenu::addButton(const std::string& text, int &x, int &h, const std::string& iconPath, KeyboardConfig::KeyAction key) { - Button *btn = new Button("", text, this); + auto *btn = new Button("", text, this); if (!iconPath.empty() && btn->setButtonIcon(iconPath)) { btn->setButtonPopupText(createShortcutCaption(text, key)); @@ -199,9 +199,9 @@ void WindowMenu::addButton(const std::string& text, int &x, int &h, void WindowMenu::updatePopUpCaptions() { - for (WidgetList::iterator it = mWidgets.begin(); it != mWidgets.end(); ++it) + for (auto it = mWidgets.begin(); it != mWidgets.end(); ++it) { - Button *button = dynamic_cast<Button*> (*it); + auto *button = dynamic_cast<Button*> (*it); if (!button) continue; |