summaryrefslogtreecommitdiff
path: root/zen/zstring.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
commit9b623ea3943165fe7efb5e47a0b5b9452c1599e6 (patch)
treedde40e07e907ac6e0ca9ea32524f2cd4810d4be6 /zen/zstring.cpp
parent9.7 (diff)
downloadFreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.gz
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.bz2
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.zip
9.8
Diffstat (limited to 'zen/zstring.cpp')
-rwxr-xr-xzen/zstring.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/zen/zstring.cpp b/zen/zstring.cpp
index 2aa3b3f2..ce94fe56 100755
--- a/zen/zstring.cpp
+++ b/zen/zstring.cpp
@@ -44,18 +44,17 @@ int compareNoCaseUtf8(const char* lhs, size_t lhsLen, const char* rhs, size_t rh
//- strncasecmp implements ASCII CI-comparsion only! => signature is broken for UTF8-input; toupper() similarly doesn't support Unicode
//- wcsncasecmp: https://opensource.apple.com/source/Libc/Libc-763.12/string/wcsncasecmp-fbsd.c
// => re-implement comparison based on towlower() to avoid memory allocations
- using namespace zen::implementation;
- UtfDecoder<char> decL(lhs, lhsLen);
- UtfDecoder<char> decR(rhs, rhsLen);
+ impl::UtfDecoder<char> decL(lhs, lhsLen);
+ impl::UtfDecoder<char> decR(rhs, rhsLen);
for (;;)
{
- const Opt<CodePoint> cpL = decL.getNext();
- const Opt<CodePoint> cpR = decR.getNext();
+ const Opt<impl::CodePoint> cpL = decL.getNext();
+ const Opt<impl::CodePoint> cpR = decR.getNext();
if (!cpL || !cpR)
return static_cast<int>(!cpR) - static_cast<int>(!cpL);
- static_assert(sizeof(wchar_t) == sizeof(CodePoint), "");
+ static_assert(sizeof(wchar_t) == sizeof(impl::CodePoint), "");
const wchar_t charL = ::towlower(static_cast<wchar_t>(*cpL)); //ordering: towlower() converts to higher code points than towupper()
const wchar_t charR = ::towlower(static_cast<wchar_t>(*cpR)); //uses LC_CTYPE category of current locale
if (charL != charR)
bgstack15