summaryrefslogtreecommitdiff
path: root/src/shared/util.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-08-01 12:10:49 +0200
committerTannin <devnull@localhost>2014-08-01 12:10:49 +0200
commit844ba99892e0a2c3ffff8b5a010c72104c8e41aa (patch)
treeb50492efc2b641b634d00b8f99d0b96ed5784ed6 /src/shared/util.cpp
parent715623e7905e5f64f5b331f4523642aab1aedd34 (diff)
- 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
Diffstat (limited to 'src/shared/util.cpp')
-rw-r--r--src/shared/util.cpp18
1 files changed, 8 insertions, 10 deletions
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)