From 844ba99892e0a2c3ffff8b5a010c72104c8e41aa Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 1 Aug 2014 12:10:49 +0200 Subject: - performance optimizations for detection of file changes in mod directories - added a workaround for download-link handling in chrome - MO will now create a profile even if the game-launcher has never been run - bugfix: files weren't cleanly removed from vfs file register --- src/shared/util.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/shared/util.cpp') diff --git a/src/shared/util.cpp b/src/shared/util.cpp index 22657e6c..61ca9cdc 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -86,30 +86,28 @@ std::wstring ToWString(const std::string &source, bool utf8) std::string &ToLower(std::string &text) { - std::transform(text.begin(), text.end(), text.begin(), tolower); + std::transform(text.begin(), text.end(), text.begin(), ::tolower); return text; } std::string ToLower(const std::string &text) { - std::string temp = text; - - std::transform(temp.begin(), temp.end(), temp.begin(), tolower); - return temp; + std::string result = text; + std::transform(result.begin(), result.end(), result.begin(), ::tolower); + return result; } std::wstring &ToLower(std::wstring &text) { - std::transform(text.begin(), text.end(), text.begin(), towlower); + std::transform(text.begin(), text.end(), text.begin(), ::towlower); return text; } std::wstring ToLower(const std::wstring &text) { - std::wstring temp = text; - - std::transform(temp.begin(), temp.end(), temp.begin(), towlower); - return temp; + std::wstring result = text; + std::transform(result.begin(), result.end(), result.begin(), ::towlower); + return result; } VS_FIXEDFILEINFO GetFileVersion(const std::wstring &fileName) -- cgit v1.3.1