summaryrefslogtreecommitdiff
path: root/src/gui/setup_relations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-13 22:58:01 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-14 01:42:53 +0300
commite40411cdc287343a32a8371f2116fcc11545b466 (patch)
tree4655f02211f1b08b8ead94175fd419c6e766f9c8 /src/gui/setup_relations.cpp
parent2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff)
downloadmv-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz
mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2
mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz
mv-e40411cdc287343a32a8371f2116fcc11545b466.zip
Improve event.getId() speed.
Diffstat (limited to 'src/gui/setup_relations.cpp')
-rw-r--r--src/gui/setup_relations.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 412f67a4c..5387b0aab 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -363,7 +363,8 @@ void Setup_Relations::cancel()
void Setup_Relations::action(const gcn::ActionEvent &event)
{
- if (event.getId() == ACTION_TABLE)
+ const std::string &eventId = event.getId();
+ if (eventId == ACTION_TABLE)
{
// temporarily eliminate ourselves: we are fully aware of this change,
// so there is no need for asynchronous updates. (In fact, thouse
@@ -378,7 +379,7 @@ void Setup_Relations::action(const gcn::ActionEvent &event)
player_relations.addListener(this);
}
- else if (event.getId() == ACTION_DELETE)
+ else if (eventId == ACTION_DELETE)
{
const int player_index = mPlayerTable->getSelectedRow();
@@ -389,7 +390,7 @@ void Setup_Relations::action(const gcn::ActionEvent &event)
player_relations.removePlayer(name);
}
- else if (event.getId() == ACTION_STRATEGY)
+ else if (eventId == ACTION_STRATEGY)
{
PlayerIgnoreStrategy *const s =
(*player_relations.getPlayerIgnoreStrategies())[