diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-13 22:58:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-14 01:42:53 +0300 |
commit | e40411cdc287343a32a8371f2116fcc11545b466 (patch) | |
tree | 4655f02211f1b08b8ead94175fd419c6e766f9c8 /src/gui/skilldialog.cpp | |
parent | 2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff) | |
download | plus-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz plus-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2 plus-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz plus-e40411cdc287343a32a8371f2116fcc11545b466.zip |
Improve event.getId() speed.
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 9 |
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); } |