summaryrefslogtreecommitdiff
path: root/src/gui/worldselectdialog.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/worldselectdialog.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/worldselectdialog.cpp')
-rw-r--r--src/gui/worldselectdialog.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}