summaryrefslogtreecommitdiff
path: root/src/gui/didyouknowwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
commitde476bb95242e10c833394ef007728072eabe60f (patch)
tree033747127a7ea4e36de42cfc99fcee56ce915bbb /src/gui/didyouknowwindow.cpp
parenta33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (diff)
downloadmanaverse-de476bb95242e10c833394ef007728072eabe60f.tar.gz
manaverse-de476bb95242e10c833394ef007728072eabe60f.tar.bz2
manaverse-de476bb95242e10c833394ef007728072eabe60f.tar.xz
manaverse-de476bb95242e10c833394ef007728072eabe60f.zip
Add const to more classes.
Diffstat (limited to 'src/gui/didyouknowwindow.cpp')
-rw-r--r--src/gui/didyouknowwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index 1c30b32ed..c9e372823 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -65,7 +65,7 @@ DidYouKnowWindow::DidYouKnowWindow():
mBrowserBox->setOpaque(false);
mScrollArea = new ScrollArea(mBrowserBox,
true, "didyouknow_background.xml");
- Button *okButton = new Button(_("Close"), "close", this);
+ Button *const okButton = new Button(_("Close"), "close", this);
mButtonPrev = new Button(_("< Previous"), "prev", this);
mButtonNext = new Button(_("Next >"), "next", this);
mOpenAgainCheckBox = new CheckBox(_("Auto open this window"),
@@ -93,7 +93,7 @@ void DidYouKnowWindow::action(const gcn::ActionEvent &event)
if (event.getId() == "close")
setVisible(false);
- unsigned num = config.getIntValue("currentTip");
+ const unsigned num = config.getIntValue("currentTip");
if (event.getId() == "prev")
loadData(num - 1);
@@ -124,7 +124,7 @@ void DidYouKnowWindow::loadData(int num)
mScrollArea->setVerticalScrollAmount(0);
}
-void DidYouKnowWindow::loadFile(int num)
+void DidYouKnowWindow::loadFile(const int num)
{
const std::string file = strprintf("tips/%d", num);
std::string helpPath = branding.getStringValue("helpPath");