diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
commit | 46f0755975033f37eaae9db73c0e2b6499c2a923 (patch) | |
tree | 5c13c361ce4a4e4fd0e07fca1953c54637965666 /src/gui/widgets/checkbox.cpp | |
parent | 1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (diff) | |
download | manaverse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.gz manaverse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.bz2 manaverse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.xz manaverse-46f0755975033f37eaae9db73c0e2b6499c2a923.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/checkbox.cpp')
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 72ca9eb8d..759ca9015 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -46,8 +46,9 @@ Image *CheckBox::checkBoxDisabledChecked; Image *CheckBox::checkBoxNormalHi; Image *CheckBox::checkBoxCheckedHi; -CheckBox::CheckBox(const std::string &caption, bool selected, - gcn::ActionListener* listener, std::string eventId): +CheckBox::CheckBox(const std::string &caption, const bool selected, + gcn::ActionListener *const listener, + const std::string &eventId) : gcn::CheckBox(caption, selected), mHasMouse(false) { @@ -152,7 +153,7 @@ void CheckBox::draw(gcn::Graphics* graphics) void CheckBox::updateAlpha() { - float alpha = std::max(Client::getGuiAlpha(), + const float alpha = std::max(Client::getGuiAlpha(), Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) @@ -173,9 +174,9 @@ void CheckBox::updateAlpha() } } -void CheckBox::drawBox(gcn::Graphics* graphics) +void CheckBox::drawBox(gcn::Graphics *const graphics) { - Image *box; + const Image *box; if (isEnabled()) { @@ -220,7 +221,7 @@ void CheckBox::mouseExited(gcn::MouseEvent& event A_UNUSED) void CheckBox::keyPressed(gcn::KeyEvent& keyEvent) { - int action = static_cast<KeyEvent*>(&keyEvent)->getActionId(); + const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId(); if (action == Input::KEY_GUI_SELECT) { |