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/npcpostdialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/npcpostdialog.cpp') diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index 5135e56bd..bb5ab3528 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -92,7 +92,8 @@ NpcPostDialog::~NpcPostDialog() void NpcPostDialog::action(const gcn::ActionEvent &event) { - if (event.getId() == "send") + const std::string &eventId = event.getId(); + if (eventId == "send") { if (mSender->getText().empty() || mText->getText().empty()) { @@ -109,7 +110,7 @@ void NpcPostDialog::action(const gcn::ActionEvent &event) } setVisible(false); } - else if (event.getId() == "cancel") + else if (eventId == "cancel") { setVisible(false); } -- cgit v1.2.3-70-g09d2