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

Pass clang-format on various cpp/header files (#5559)

This commit is contained in:
Loïc Blot 2017-04-23 09:52:40 +02:00 committed by GitHub
parent 0c34fe20a1
commit 91a9382c25
30 changed files with 138 additions and 183 deletions

View file

@ -64,8 +64,7 @@ bool Metadata::operator==(const Metadata &other) const
return true;
}
const std::string &Metadata::getString(const std::string &name,
u16 recursion) const
const std::string &Metadata::getString(const std::string &name, u16 recursion) const
{
StringMap::const_iterator it = m_stringvars.find(name);
if (it == m_stringvars.end()) {
@ -99,11 +98,9 @@ bool Metadata::setString(const std::string &name, const std::string &var)
return true;
}
const std::string &Metadata::resolveString(const std::string &str,
u16 recursion) const
const std::string &Metadata::resolveString(const std::string &str, u16 recursion) const
{
if (recursion <= 1 &&
str.substr(0, 2) == "${" && str[str.length() - 1] == '}') {
if (recursion <= 1 && str.substr(0, 2) == "${" && str[str.length() - 1] == '}') {
return getString(str.substr(2, str.length() - 3), recursion + 1);
} else {
return str;