mirror of https://github.com/OpenMW/openmw
Use std::string_view argument
This commit is contained in:
parent
ae68f4600b
commit
d5ca678efc
|
|
@ -15,9 +15,9 @@ namespace Misc::StringUtils
|
||||||
bool operator()(char x, char y) const { return toLower(x) < toLower(y); }
|
bool operator()(char x, char y) const { return toLower(x) < toLower(y); }
|
||||||
};
|
};
|
||||||
|
|
||||||
inline std::string underscoresToSpaces(const std::string& oldName)
|
inline std::string underscoresToSpaces(const std::string_view& oldName)
|
||||||
{
|
{
|
||||||
std::string newName = oldName;
|
std::string newName(oldName);
|
||||||
std::replace(newName.begin(), newName.end(), '_', ' ');
|
std::replace(newName.begin(), newName.end(), '_', ' ');
|
||||||
return newName;
|
return newName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue