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/charcreatedialog.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/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 26383d48..8cec4279 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -54,7 +54,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mCharSelectDialog(parent), mSlot(slot) { - mPlayer = new Being(0, ActorSprite::PLAYER, 0, NULL); + mPlayer = new Being(0, ActorSprite::PLAYER, 0, nullptr); mPlayer->setGender(GENDER_MALE); const std::vector<int> &items = CharDB::getDefaultItems(); @@ -160,7 +160,7 @@ CharCreateDialog::~CharCreateDialog() delete mPlayer; // Make sure the char server handler knows that we're gone - Net::getCharHandler()->setCharCreateDialog(0); + Net::getCharHandler()->setCharCreateDialog(nullptr); } void CharCreateDialog::action(const gcn::ActionEvent &event) @@ -330,18 +330,18 @@ void CharCreateDialog::setAttributes(const std::vector<std::string> &labels, { const int y = 140 + i * 20; - Label *attributeLabel = new Label(labels[i]); + auto *attributeLabel = new Label(labels[i]); attributeLabel->setWidth(70); attributeLabel->setPosition(5, y); add(attributeLabel); - Slider *attributeSlider = new Slider(min, max); + auto *attributeSlider = new Slider(min, max); attributeSlider->setDimension(gcn::Rectangle(75, y, 100, 10)); attributeSlider->setActionEventId("statslider"); attributeSlider->addActionListener(this); add(attributeSlider); - Label *attributeValue = new Label(toString(min)); + auto *attributeValue = new Label(toString(min)); attributeValue->setPosition(180, y); add(attributeValue); |