diff options
author | Max Kellermann <max@musicpd.org> | 2018-08-02 21:01:12 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-02 21:01:39 +0200 |
commit | 4b16a8bf8434a9067121d47bf8e92b76ed57adc9 (patch) | |
tree | f5dcb6b6303e906fd8bb571abfab5c318290e514 /src | |
parent | ca4c81dd8463258f321415c92edf607fc81520b4 (diff) |
lib/icu: require at least version 50
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/icu/Collate.cxx | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx index aaff50acf..cf19a4105 100644 --- a/src/lib/icu/Collate.cxx +++ b/src/lib/icu/Collate.cxx @@ -85,23 +85,8 @@ IcuCollate(const char *a, const char *b) noexcept #ifdef HAVE_ICU assert(collator != nullptr); -#if U_ICU_VERSION_MAJOR_NUM >= 50 UErrorCode code = U_ZERO_ERROR; return (int)ucol_strcollUTF8(collator, a, -1, b, -1, &code); -#else - /* fall back to ucol_strcoll() */ - - try { - const auto au = UCharFromUTF8(a); - const auto bu = UCharFromUTF8(b); - - return ucol_strcoll(collator, au.begin(), au.size(), - bu.begin(), bu.size()); - } catch (...) { - /* fall back to plain strcasecmp() */ - return strcasecmp(a, b); - } -#endif #elif defined(_WIN32) AllocatedString<wchar_t> wa = nullptr, wb = nullptr; |