summaryrefslogtreecommitdiff
path: root/src/chat.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-19 23:02:07 +0200
committerGitHub <noreply@github.com>2017-04-19 23:02:07 +0200
commitf3fe62a0bf9e775b3e6e838f104ab605a2238792 (patch)
tree1335fc9752d54924dd3a8f22e70d555fb54945c8 /src/chat.h
parentcfe0291b131630a7400fdcf46b720bd70d8d0fa0 (diff)
downloadminetest-f3fe62a0bf9e775b3e6e838f104ab605a2238792.tar.gz
minetest-f3fe62a0bf9e775b3e6e838f104ab605a2238792.tar.bz2
minetest-f3fe62a0bf9e775b3e6e838f104ab605a2238792.zip
Fix various copy instead of const ref reported by cppcheck (#5615)
* Also remove InventoryList::peekItem unused function * Fix some post increment to preincrement reported by cppcheck
Diffstat (limited to 'src/chat.h')
-rw-r--r--src/chat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chat.h b/src/chat.h
index 11061fd39..5de676a2e 100644
--- a/src/chat.h
+++ b/src/chat.h
@@ -38,14 +38,14 @@ struct ChatLine
// message text
EnrichedString text;
- ChatLine(std::wstring a_name, std::wstring a_text):
+ ChatLine(const std::wstring &a_name, const std::wstring &a_text):
age(0.0),
name(a_name),
text(a_text)
{
}
- ChatLine(EnrichedString a_name, EnrichedString a_text):
+ ChatLine(const EnrichedString &a_name, const EnrichedString &a_text):
age(0.0),
name(a_name),
text(a_text)
@@ -148,7 +148,7 @@ private:
class ChatPrompt
{
public:
- ChatPrompt(std::wstring prompt, u32 history_limit);
+ ChatPrompt(const std::wstring &prompt, u32 history_limit);
~ChatPrompt();
// Input character or string