Fix a memleak pointed by @Zeno- in MeshUpdateQueue
[oweals/minetest.git] / src / chat.h
index 11061fd39e1c0e5619ec9d4b59c2961a7fe1260a..5de676a2e02e9debb0489126885d4fcbd4c652c5 100644 (file)
@@ -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