1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

fixed warnings reported by cppcheck

This commit is contained in:
Perttu Ahola 2011-04-11 11:36:13 +03:00
parent 3f153c20d3
commit 9d4e9c59de
10 changed files with 19 additions and 9 deletions

View file

@ -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());