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/worldselectdialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/worldselectdialog.cpp') diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp index 51d61fa9c..93314ff16 100644 --- a/src/gui/worldselectdialog.cpp +++ b/src/gui/worldselectdialog.cpp @@ -125,7 +125,8 @@ WorldSelectDialog::~WorldSelectDialog() void WorldSelectDialog::action(const gcn::ActionEvent &event) { - if (event.getId() == "world") + const std::string &eventId = event.getId(); + if (eventId == "world") { mChangeLoginButton->setEnabled(false); mChooseWorld->setEnabled(false); @@ -135,7 +136,7 @@ void WorldSelectDialog::action(const gcn::ActionEvent &event) if (Client::getState() == STATE_WORLD_SELECT) Client::setState(STATE_WORLD_SELECT_ATTEMPT); } - else if (event.getId() == "login") + else if (eventId == "login") { Client::setState(STATE_PRE_LOGIN); } -- cgit v1.2.3-70-g09d2