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/net/ea | |
parent | 2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff) | |
download | mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2 mv-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz mv-e40411cdc287343a32a8371f2116fcc11545b466.zip |
Improve event.getId() speed.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/tradehandler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index cb62ec3bb..01bbeb45e 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -53,9 +53,10 @@ namespace void action(const gcn::ActionEvent &event) { confirmDlg = nullptr; - if (event.getId() == "ignore") + const std::string &eventId = event.getId(); + if (eventId == "ignore") player_relations.ignoreTrade(tradePartnerName); - Net::getTradeHandler()->respond(event.getId() == "yes"); + Net::getTradeHandler()->respond(eventId == "yes"); } } listener; } |