From a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 Aug 2012 21:29:59 +0300 Subject: Add const to some classes. --- src/gui/buyselldialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/buyselldialog.cpp') 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); -- cgit v1.2.3-60-g2f50