summaryrefslogtreecommitdiff
path: root/src/gui/npcpostdialog.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/npcpostdialog.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/npcpostdialog.cpp')
-rw-r--r--src/gui/npcpostdialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 6f673f5c..3567472a 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -51,10 +51,10 @@ NpcPostDialog::NpcPostDialog(int npcId):
mSender->setWidth(65);
// create button for sending
- Button *sendButton = new Button(_("Send"), "send", this);
+ auto *sendButton = new Button(_("Send"), "send", this);
sendButton->setPosition(400 - sendButton->getWidth(),
170 - sendButton->getHeight());
- Button *cancelButton = new Button(_("Cancel"), "cancel", this);
+ auto *cancelButton = new Button(_("Cancel"), "cancel", this);
cancelButton->setPosition(sendButton->getX() - (cancelButton->getWidth() + 2),
sendButton->getY());
@@ -64,7 +64,7 @@ NpcPostDialog::NpcPostDialog(int npcId):
mText->setEditable(true);
// create scroll box for letter text
- ScrollArea *scrollArea = new ScrollArea(mText);
+ auto *scrollArea = new ScrollArea(mText);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
scrollArea->setDimension(gcn::Rectangle(
5, mSender->getHeight() + 5,
@@ -124,8 +124,8 @@ void NpcPostDialog::setVisible(bool visible)
void NpcPostDialog::closeAll()
{
- DialogList::iterator it = instances.begin();
- DialogList::iterator it_end = instances.end();
+ auto it = instances.begin();
+ auto it_end = instances.end();
for (; it != it_end; it++)
{