summaryrefslogtreecommitdiff
path: root/src/lib/icu/Collate.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-02 21:01:12 +0200
committerMax Kellermann <max@musicpd.org>2018-08-02 21:01:39 +0200
commit4b16a8bf8434a9067121d47bf8e92b76ed57adc9 (patch)
treef5dcb6b6303e906fd8bb571abfab5c318290e514 /src/lib/icu/Collate.cxx
parentca4c81dd8463258f321415c92edf607fc81520b4 (diff)
lib/icu: require at least version 50
Diffstat (limited to 'src/lib/icu/Collate.cxx')
-rw-r--r--src/lib/icu/Collate.cxx15
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;