mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Use const references for Settings methods
Also check for (this == &other) before locking mutexes.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user