diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-21 19:30:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-21 19:30:40 +0300 |
commit | f3ac812e2079eac53c1a9db56541d7103bd14a61 (patch) | |
tree | 3a9a9e9deebdbbb44da32ad4b1656743c4ff80c1 /src/gui | |
parent | f61f794776fd37223c0977437a6bfcfef6759f84 (diff) | |
download | plus-f3ac812e2079eac53c1a9db56541d7103bd14a61.tar.gz plus-f3ac812e2079eac53c1a9db56541d7103bd14a61.tar.bz2 plus-f3ac812e2079eac53c1a9db56541d7103bd14a61.tar.xz plus-f3ac812e2079eac53c1a9db56541d7103bd14a61.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/dropdown.h | 3 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index c3f7c002c..265b69948 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -85,7 +85,8 @@ class DropDown final : public ActionListener, void drawFrame(Graphics *const graphics) override final A_NONNULL(2); - void safeDrawFrame(Graphics *const graphics) override final A_NONNULL(2); + void safeDrawFrame(Graphics *const graphics) override final + A_NONNULL(2); // Inherited from KeyListener diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index d5c2677ac..6066170d2 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -803,11 +803,12 @@ void ChatWindow::keyPressed(KeyEvent &event) else if (actionId == InputAction::GUI_INSERT && !mChatInput->getText().empty()) { + const std::string str = mChatInput->getText(); // Add the current message to the history and clear the text - if (mHistory.empty() || mChatInput->getText() != mHistory.back()) - mHistory.push_back(mChatInput->getText()); + if (mHistory.empty() || str != mHistory.back()) + mHistory.push_back(str); mCurHist = mHistory.end(); - mChatInput->setText(""); + mChatInput->setText(std::string()); } else if (actionId == InputAction::GUI_TAB && !mChatInput->getText().empty()) |