diff --git a/components/openmw-mp/Utils.cpp b/components/openmw-mp/Utils.cpp index 011e91ebd..c9a65f462 100644 --- a/components/openmw-mp/Utils.cpp +++ b/components/openmw-mp/Utils.cpp @@ -32,9 +32,7 @@ std::string Utils::convertPath(std::string str) #endif #if defined(_WIN32) || defined(__APPLE__) - for (auto &ch : str) - if (ch == '/') - ch = _SEP_; + replace(str.begin(), str.end(), '/', _SEP_); #endif //defined(_WIN32) || defined(__APPLE__) return str;