summaryrefslogtreecommitdiff
path: root/src/gui/buyselldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-26 21:29:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-26 21:29:59 +0300
commita33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (patch)
tree1b1e98a615e2c03641c99b66cb4667b56f7087c3 /src/gui/buyselldialog.cpp
parent012a10fd8153f3ddb775dde1e4dba4456f2aa9de (diff)
downloadmv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.gz
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.bz2
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.xz
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.zip
Add const to some classes.
Diffstat (limited to 'src/gui/buyselldialog.cpp')
-rw-r--r--src/gui/buyselldialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/buyselldialog.cpp b/src/gui/buyselldialog.cpp
index cdcf90be9..7fff70fc0 100644
--- a/src/gui/buyselldialog.cpp
+++ b/src/gui/buyselldialog.cpp
@@ -34,7 +34,7 @@
BuySellDialog::DialogList BuySellDialog::instances;
-BuySellDialog::BuySellDialog(int npcId):
+BuySellDialog::BuySellDialog(const int npcId):
Window(_("Shop"), false, nullptr, "buysell.xml"),
mNpcId(npcId),
mNick(""),
@@ -63,11 +63,12 @@ void BuySellDialog::init()
N_("Buy"), N_("Sell"), N_("Cancel"), nullptr
};
const int buttonPadding = getOption("buttonpadding", 10);
- int x = buttonPadding, y = buttonPadding;
+ int x = buttonPadding;
+ const int y = buttonPadding;
for (const char **curBtn = buttonNames; *curBtn; curBtn++)
{
- Button *btn = new Button(gettext(*curBtn), *curBtn, this);
+ Button *const btn = new Button(gettext(*curBtn), *curBtn, this);
if (!mBuyButton)
mBuyButton = btn; // For focus request
btn->setPosition(x, y);