summaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp15
1 files changed, 1 insertions, 14 deletions
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;
}