1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 12:35:46 +00:00

Use std::string_view argument

This commit is contained in:
Sam Hellawell 2024-04-02 15:19:47 +01:00
parent ae68f4600b
commit d5ca678efc

View File

@ -15,9 +15,9 @@ namespace Misc::StringUtils
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(), '_', ' ');
return newName;
}