diff options
| author | Tannin <devnull@localhost> | 2014-08-01 12:10:49 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-08-01 12:10:49 +0200 |
| commit | 5d4a55c3a67caec2811a2b997753adc116403d77 (patch) | |
| tree | d41b89904717197efb5a2e00f906e534cb3c3d54 /src/shared/util.cpp | |
| parent | 470b6ed0bf20525988d719d23725f7c9d19a9f36 (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.cpp | 18 |
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)
|
