diff options
author | Patric Stout <truebrain@openttd.org> | 2019-03-10 16:46:19 +0100 |
---|---|---|
committer | Patric Stout <truebrain@openttd.org> | 2019-03-11 10:16:00 +0100 |
commit | 36105841b9d09a3c1cd1a8f7a5bd7b84af135d9f (patch) | |
tree | 55f8b48637df8c4b15d6a6f569f2b71b71f86106 /src/string.cpp | |
parent | 52d7e7d45e0a2a6033942602ed9fdec821a7d2af (diff) | |
download | openttd-36105841b9d09a3c1cd1a8f7a5bd7b84af135d9f.tar.xz |
Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/string.cpp b/src/string.cpp index ae1b556af..18ed863d0 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -37,12 +37,12 @@ #include "os/macosx/string_osx.h" #endif -#ifdef WITH_ICU_SORT +#ifdef WITH_ICU_I18N /* Required by strnatcmp. */ #include <unicode/ustring.h> #include "language.h" #include "gfx_func.h" -#endif /* WITH_ICU_SORT */ +#endif /* WITH_ICU_I18N */ /* The function vsnprintf is used internally to perform the required formatting * tasks. As such this one must be allowed, and makes sure it's terminated. */ @@ -584,13 +584,13 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) s2 = SkipGarbage(s2); } -#ifdef WITH_ICU_SORT +#ifdef WITH_ICU_I18N if (_current_collator != NULL) { UErrorCode status = U_ZERO_ERROR; int result = _current_collator->compareUTF8(s1, s2, status); if (U_SUCCESS(status)) return result; } -#endif /* WITH_ICU_SORT */ +#endif /* WITH_ICU_I18N */ #if defined(_WIN32) && !defined(STRGEN) && !defined(SETTINGSGEN) int res = OTTDStringCompare(s1, s2); @@ -613,7 +613,7 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) return new UniscribeStringIterator(); } -#elif defined(WITH_ICU_SORT) +#elif defined(WITH_ICU_I18N) #include <unicode/utext.h> #include <unicode/brkiter.h> |