From 562c26977012aa632a6067517939bc8f1fd72984 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 9 Aug 2015 13:54:17 +0000 Subject: (svn r27377) -Codechange: use the pkg-config files of ICU as well. Since they are split into separate libraries it becomes possible to split RTL support for natural sorting, although the effect will be minimal --- src/string.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index 377fb7f98..fd422ec63 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -575,20 +575,7 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) #ifdef WITH_ICU_SORT if (_current_collator != NULL) { UErrorCode status = U_ZERO_ERROR; - int result; - - /* We want to use the new faster method for ICU 4.2 and higher. */ -#if U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 2) - /* The StringPiece parameter gets implicitly constructed from the char *. */ - result = _current_collator->compareUTF8(s1, s2, status); -#else /* The following for 4.0 and lower. */ - UChar buffer1[DRAW_STRING_BUFFER]; - u_strFromUTF8Lenient(buffer1, lengthof(buffer1), NULL, s1, -1, &status); - UChar buffer2[DRAW_STRING_BUFFER]; - u_strFromUTF8Lenient(buffer2, lengthof(buffer2), NULL, s2, -1, &status); - - result = _current_collator->compare(buffer1, buffer2, status); -#endif /* ICU version check. */ + int result = _current_collator->compareUTF8(s1, s2, status); if (U_SUCCESS(status)) return result; } -- cgit v1.2.3-54-g00ecf