summaryrefslogtreecommitdiff
path: root/src/shared/util.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-05-03 21:32:33 -0500
committerLostDragonist <lost.dragonist@gmail.com>2019-05-03 21:32:33 -0500
commit179a73857125ee604f42b0d5c2d765183c86d2c7 (patch)
treeb9b3f9d62bd5640de839d150a53ab8ef119dab9c /src/shared/util.cpp
parente2b799bd6b5cfd51969fefd1dab5e5b1b7e5f81c (diff)
parent907c5468424b48774f5da2a6b5f96f26590987b0 (diff)
Merge pull request #695 from ModOrganizer2/Develop
Stage for Release 2.2.0
Diffstat (limited to 'src/shared/util.cpp')
-rw-r--r--src/shared/util.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/shared/util.cpp b/src/shared/util.cpp
index bad0d64d..ed7c434e 100644
--- a/src/shared/util.cpp
+++ b/src/shared/util.cpp
@@ -108,27 +108,31 @@ static auto locToLower = [] (char in) -> char {
std::string &ToLower(std::string &text)
{
- std::transform(text.begin(), text.end(), text.begin(), locToLower);
+ //std::transform(text.begin(), text.end(), text.begin(), locToLower);
+ CharLowerBuffA(const_cast<CHAR *>(text.c_str()), static_cast<DWORD>(text.size()));
return text;
}
std::string ToLower(const std::string &text)
{
std::string result(text);
- std::transform(result.begin(), result.end(), result.begin(), locToLower);
+ //std::transform(result.begin(), result.end(), result.begin(), locToLower);
+ CharLowerBuffA(const_cast<CHAR *>(result.c_str()), static_cast<DWORD>(result.size()));
return result;
}
std::wstring &ToLower(std::wstring &text)
{
- std::transform(text.begin(), text.end(), text.begin(), locToLowerW);
+ //std::transform(text.begin(), text.end(), text.begin(), locToLowerW);
+ CharLowerBuffW(const_cast<WCHAR *>(text.c_str()), static_cast<DWORD>(text.size()));
return text;
}
std::wstring ToLower(const std::wstring &text)
{
std::wstring result(text);
- std::transform(result.begin(), result.end(), result.begin(), locToLowerW);
+ //std::transform(result.begin(), result.end(), result.begin(), locToLowerW);
+ CharLowerBuffW(const_cast<WCHAR *>(result.c_str()), static_cast<DWORD>(result.size()));
return result;
}