diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 07:42:40 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 07:42:40 +0200 |
commit | 8e0b80aa369df7d1142053f077df928106c6ce8c (patch) | |
tree | 7f12869eef1a18364be9d8db67e01d060bc11d60 /src/chat.cpp | |
parent | a90d27e1e23fa1c369c05a4d9c6083aa86ef7f52 (diff) | |
download | minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.gz minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.bz2 minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.zip |
Fix last performance-type-promotion-in-math-fn problems
Diffstat (limited to 'src/chat.cpp')
-rw-r--r-- | src/chat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chat.cpp b/src/chat.cpp index cc0980230..c3ed59804 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -402,7 +402,7 @@ void ChatPrompt::input(const std::wstring &str) m_nick_completion_end = 0; } -void ChatPrompt::addToHistory(std::wstring line) +void ChatPrompt::addToHistory(const std::wstring &line) { if (!line.empty() && (m_history.size() == 0 || m_history.back() != line)) { @@ -426,7 +426,7 @@ void ChatPrompt::clear() m_nick_completion_end = 0; } -std::wstring ChatPrompt::replace(std::wstring line) +std::wstring ChatPrompt::replace(const std::wstring &line) { std::wstring old_line = m_line; m_line = line; @@ -660,7 +660,7 @@ ChatBackend::ChatBackend(): { } -void ChatBackend::addMessage(std::wstring name, std::wstring text) +void ChatBackend::addMessage(const std::wstring &name, std::wstring text) { // Note: A message may consist of multiple lines, for example the MOTD. text = translate_string(text); |