summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-18 13:46:44 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-18 13:46:44 +0300
commitb6c4f2b9afac13ec056ba72543f69f9843500039 (patch)
treee6648979f811d4fcb409531cae334e3cb0605212 /src/gui/widgets
parentae83c977b2df61ae6441ccee8b594f9c7819de1d (diff)
downloadmanaverse-b6c4f2b9afac13ec056ba72543f69f9843500039.tar.gz
manaverse-b6c4f2b9afac13ec056ba72543f69f9843500039.tar.bz2
manaverse-b6c4f2b9afac13ec056ba72543f69f9843500039.tar.xz
manaverse-b6c4f2b9afac13ec056ba72543f69f9843500039.zip
improve widgetgroup.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/widgetgroup.cpp4
-rw-r--r--src/gui/widgets/widgetgroup.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp
index cea1b70e1..b3f204120 100644
--- a/src/gui/widgets/widgetgroup.cpp
+++ b/src/gui/widgets/widgetgroup.cpp
@@ -37,12 +37,12 @@ WidgetGroup::WidgetGroup(const Widget2 *const widget,
addWidgetListener(this);
}
-void WidgetGroup::addButton(std::string tag)
+void WidgetGroup::addButton(const std::string &tag)
{
addButton(tag, tag);
}
-void WidgetGroup::addButton(std::string text, std::string tag)
+void WidgetGroup::addButton(const std::string &text, const std::string &tag)
{
if (text.empty() || tag.empty())
return;
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index a247f0bb8..b7ec6bd29 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -39,9 +39,10 @@ class WidgetGroup : public Container,
A_DELETE_COPY(WidgetGroup)
- virtual void addButton(std::string tag);
+ virtual void addButton(const std::string &tag);
- virtual void addButton(std::string text, std::string tag);
+ virtual void addButton(const std::string &text,
+ const std::string &tag);
void action(const gcn::ActionEvent &event) override;