summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 29b9cb3db..053bcbd1b 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -296,7 +296,8 @@ SkillDialog::~SkillDialog()
void SkillDialog::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "inc")
+ const std::string &eventId = event.getId();
+ if (eventId == "inc")
{
const SkillTab *const tab = static_cast<const SkillTab *const>(
mTabs->getSelectedTab());
@@ -306,7 +307,7 @@ void SkillDialog::action(const gcn::ActionEvent &event)
Net::getPlayerHandler()->increaseSkill(info->id);
}
}
- else if (event.getId() == "sel")
+ else if (eventId == "sel")
{
const SkillTab *const tab = static_cast<const SkillTab *const>(
mTabs->getSelectedTab());
@@ -330,7 +331,7 @@ void SkillDialog::action(const gcn::ActionEvent &event)
}
}
}
- else if (event.getId() == "use")
+ else if (eventId == "use")
{
const SkillTab *const tab = static_cast<const SkillTab *const>(
mTabs->getSelectedTab());
@@ -348,7 +349,7 @@ void SkillDialog::action(const gcn::ActionEvent &event)
}
}
}
- else if (event.getId() == "close")
+ else if (eventId == "close")
{
setVisible(false);
}