summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/widgets/button.cpp
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-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/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 9247f67a..fb0d4cbe 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -38,7 +38,7 @@
int Button::mInstances = 0;
float Button::mAlpha = 1.0;
ImageRect *Button::mButton;
-TextPopup *Button::mTextPopup = 0;
+TextPopup *Button::mTextPopup = nullptr;
enum{
BUTTON_STANDARD, // 0
@@ -63,7 +63,7 @@ static ButtonData const data[BUTTON_COUNT] = {
};
Button::Button():
- mButtonIcon(0)
+ mButtonIcon(nullptr)
{
init();
adjustSize();
@@ -72,7 +72,7 @@ Button::Button():
Button::Button(const std::string &caption, const std::string &actionEventId,
gcn::ActionListener *listener):
gcn::Button(caption),
- mButtonIcon(0)
+ mButtonIcon(nullptr)
{
init();
setActionEventId(actionEventId);
@@ -127,10 +127,10 @@ void Button::removeButtonIcon(bool adjustButtonSize)
for (int mode = 0; mode < BUTTON_COUNT; ++mode)
{
delete mButtonIcon[mode];
- mButtonIcon[mode] = 0;
+ mButtonIcon[mode] = nullptr;
}
delete[] mButtonIcon;
- mButtonIcon = 0;
+ mButtonIcon = nullptr;
if (adjustButtonSize)
adjustSize();
@@ -189,7 +189,7 @@ Button::~Button()
// Remove the popup
delete mTextPopup;
- mTextPopup = 0;
+ mTextPopup = nullptr;
}
// Don' try to readjust the size when it's about to be deleted.
removeButtonIcon(false);