diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-30 22:53:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-30 22:53:27 +0300 |
commit | 5cbd0d2cb7086fda592c00dbc3b07d06af95f080 (patch) | |
tree | d36b4ac344f31f34311c7cb7a9a637ed48356e3e /src/gui/widgets/tabstrip.cpp | |
parent | 4210163dae7d6266923ab11f78b631173c9533e3 (diff) | |
download | manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.gz manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.bz2 manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.xz manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/tabstrip.cpp')
-rw-r--r-- | src/gui/widgets/tabstrip.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp index 758b69846..3e408288d 100644 --- a/src/gui/widgets/tabstrip.cpp +++ b/src/gui/widgets/tabstrip.cpp @@ -27,19 +27,20 @@ #include "debug.h" -TabStrip::TabStrip(std::string group, int height, int spacing) : +TabStrip::TabStrip(const std::string &group, const int height, + const int spacing) : WidgetGroup(group, height, spacing) { } -TabStrip::TabStrip(int height, int spacing) : +TabStrip::TabStrip(const int height, const int spacing) : WidgetGroup("", height, spacing) { } gcn::Widget *TabStrip::createWidget(std::string text) { - Button *widget = new Button(); + Button *const widget = new Button(); widget->setStick(true); widget->setCaption(text); widget->adjustSize(); @@ -53,7 +54,7 @@ void TabStrip::action(const gcn::ActionEvent &event) WidgetGroup::action(event); if (event.getSource()) { - gcn::Widget *widget = event.getSource(); + gcn::Widget *const widget = event.getSource(); if (static_cast<Button*>(widget)->isPressed2()) { for (WidgetListConstIterator iter = mWidgets.begin(); @@ -61,7 +62,7 @@ void TabStrip::action(const gcn::ActionEvent &event) { if (*iter != widget) { - Button *button = static_cast<Button*>(*iter); + Button *const button = static_cast<Button*>(*iter); button->setPressed(false); } } |