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

Use const references for Settings methods

Also check for (this == &other) before locking mutexes.
This commit is contained in:
ShadowNinja 2014-09-11 13:42:21 -04:00
parent b97c9c6577
commit cd64a92a8c
3 changed files with 71 additions and 78 deletions

View file

@ -191,7 +191,7 @@ std::string urldecode(std::string str)
return oss.str();
}
u32 readFlagString(std::string str, FlagDesc *flagdesc, u32 *flagmask)
u32 readFlagString(std::string str, const FlagDesc *flagdesc, u32 *flagmask)
{
u32 result = 0, mask = 0;
char *s = &str[0];
@ -225,7 +225,7 @@ u32 readFlagString(std::string str, FlagDesc *flagdesc, u32 *flagmask)
return result;
}
std::string writeFlagString(u32 flags, FlagDesc *flagdesc, u32 flagmask)
std::string writeFlagString(u32 flags, const FlagDesc *flagdesc, u32 flagmask)
{
std::string result;