From 3d294500ba3ea9c4829862a589c0cae1067cccd1 Mon Sep 17 00:00:00 2001 From: Koncord Date: Wed, 8 Mar 2017 12:06:47 +0800 Subject: [PATCH] [General] Use std::replace() instead for-each in Utils::convertPath() --- components/openmw-mp/Utils.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;