From e40411cdc287343a32a8371f2116fcc11545b466 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 13 Feb 2013 22:58:01 +0300 Subject: Improve event.getId() speed. --- src/gui/skilldialog.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/skilldialog.cpp') 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( 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( 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( mTabs->getSelectedTab()); @@ -348,7 +349,7 @@ void SkillDialog::action(const gcn::ActionEvent &event) } } } - else if (event.getId() == "close") + else if (eventId == "close") { setVisible(false); } -- cgit v1.2.3-60-g2f50