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/chatwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/chatwindow.cpp') diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 4ff2f5f56..705ef6e61 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -517,7 +517,8 @@ void ChatWindow::defaultTab() void ChatWindow::action(const gcn::ActionEvent &event) { - if (event.getId() == "chatinput") + const std::string &eventId = event.getId(); + if (eventId == "chatinput") { std::string message = mChatInput->getText(); @@ -550,7 +551,7 @@ void ChatWindow::action(const gcn::ActionEvent &event) setVisible(false); } } - else if (event.getId() == ACTION_COLOR_PICKER) + else if (eventId == ACTION_COLOR_PICKER) { if (mColorPicker) { -- cgit v1.2.3-70-g09d2