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:
parent
b97c9c6577
commit
cd64a92a8c
3 changed files with 71 additions and 78 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue