diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
commit | c79403e1341ac533df1771b866d1f5cee15e12b5 (patch) | |
tree | 5bed6dfb44f7fce0432bd7a7a28d2d23db07ce80 /src/gui/setup.cpp | |
parent | 7c79aa2b8e484319e3e511fa21db6d2448347024 (diff) | |
download | manaverse-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.gz manaverse-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.bz2 manaverse-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.xz manaverse-c79403e1341ac533df1771b866d1f5cee15e12b5.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r-- | src/gui/setup.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index b849823d9..161b2326d 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -58,7 +58,7 @@ Setup::Setup(): setStickyButtonLock(true); int width = 620; - int height = 450; + const int height = 450; if (config.getIntValue("screenwidth") >= 730) width += 100; @@ -76,9 +76,9 @@ Setup::Setup(): }; int x = width; const int buttonPadding = getOption("buttonPadding", 5); - for (const char **curBtn = buttonNames; *curBtn; ++ curBtn) + for (const char ** curBtn = buttonNames; *curBtn; ++ curBtn) { - Button *btn = new Button(gettext(*curBtn), *curBtn, this); + Button *const btn = new Button(gettext(*curBtn), *curBtn, this); x -= btn->getWidth() + buttonPadding; btn->setPosition(x, height - btn->getHeight() - buttonPadding); add(btn); @@ -109,13 +109,13 @@ Setup::Setup(): i_end = mTabs.end(); i != i_end; ++i) { - SetupTab *tab = *i; + SetupTab *const tab = *i; mPanel->addTab(tab->getName(), tab); } add(mPanel); - Label *version = new Label(FULL_VERSION); + Label *const version = new Label(FULL_VERSION); // version->setPosition(9, height - version->getHeight() - 9); if (mResetWindows) { @@ -175,7 +175,7 @@ void Setup::action(const gcn::ActionEvent &event) } } -void Setup::setInGame(bool inGame) +void Setup::setInGame(const bool inGame) { mResetWindows->setEnabled(inGame); } @@ -190,7 +190,7 @@ void Setup::externalUpdate() } } -void Setup::registerWindowForReset(Window *window) +void Setup::registerWindowForReset(Window *const window) { mWindowsToReset.push_back(window); } |