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/net/ea/tradehandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/net/ea') 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; } -- cgit v1.2.3-70-g09d2