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:
parent
3f153c20d3
commit
9d4e9c59de
10 changed files with 19 additions and 9 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue