From 580ed9026f0f9e0cff5f6e9818c9e2248a0ae4e5 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 25 Jun 2012 17:24:00 +0200 Subject: WINTERMUTE: Remove std::replace from PathUtil --- engines/wintermute/utils/PathUtil.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/wintermute') diff --git a/engines/wintermute/utils/PathUtil.cpp b/engines/wintermute/utils/PathUtil.cpp index 284db8acfc..ba432019eb 100644 --- a/engines/wintermute/utils/PathUtil.cpp +++ b/engines/wintermute/utils/PathUtil.cpp @@ -37,7 +37,10 @@ namespace WinterMute { AnsiString PathUtil::UnifySeparators(const AnsiString &path) { AnsiString newPath = path; - std::replace(newPath.begin(), newPath.end(), L'\\', L'/'); + AnsiString::iterator it; + for (it = newPath.begin(); it != newPath.end(); it++) { + if (*it == '\\') *it = '/'; + } return newPath; } -- cgit v1.2.3