diff options
Diffstat (limited to 'src/utility.h')
-rw-r--r-- | src/utility.h | 4 |
1 files changed, 2 insertions, 2 deletions
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()); |