aboutsummaryrefslogtreecommitdiff
path: root/src/utility.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-11 11:36:13 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-11 11:36:13 +0300
commit9d4e9c59de533ae28badb22da87cb553783dd133 (patch)
tree1497631e01225065e680c897ffeb7cf228690af2 /src/utility.h
parent3f153c20d3936d18398149082fc453aa55859b1e (diff)
downloaddragonfireclient-9d4e9c59de533ae28badb22da87cb553783dd133.tar.xz
fixed warnings reported by cppcheck
Diffstat (limited to 'src/utility.h')
-rw-r--r--src/utility.h4
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());