From 9d4e9c59de533ae28badb22da87cb553783dd133 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 11 Apr 2011 11:36:13 +0300 Subject: fixed warnings reported by cppcheck --- src/utility.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index 50bbe1496..e3a977400 100644 --- a/src/utility.h +++ b/src/utility.h @@ -1903,7 +1903,7 @@ inline v3f intToFloat(v3s16 p, f32 d) */ // Creates a string with the length as the first two bytes -inline std::string serializeString(const std::string plain) +inline std::string serializeString(const std::string &plain) { assert(plain.size() <= 65535); char buf[2]; @@ -1945,7 +1945,7 @@ inline std::string deSerializeString(std::istream &is) } // Creates a string with the length as the first four bytes -inline std::string serializeLongString(const std::string plain) +inline std::string serializeLongString(const std::string &plain) { char buf[4]; writeU32((u8*)&buf[0], plain.size()); -- cgit v1.2.3