diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-13 22:58:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-14 01:42:53 +0300 |
commit | e40411cdc287343a32a8371f2116fcc11545b466 (patch) | |
tree | 4655f02211f1b08b8ead94175fd419c6e766f9c8 /src/gui/chatwindow.cpp | |
parent | 2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff) | |
download | manaplus-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz manaplus-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2 manaplus-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz manaplus-e40411cdc287343a32a8371f2116fcc11545b466.zip |
Improve event.getId() speed.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r-- | src/gui/chatwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |