CompareString() flags simplified to work on Windows XP

This commit is contained in:
Simon Rozman 2016-10-13 12:55:44 +02:00
parent 0180cb6306
commit d46557a367

View File

@ -234,7 +234,7 @@ namespace ZRCola {
/// ///
static inline int CompareName(LCID locale, const wchar_t *str_a, unsigned __int16 count_a, const wchar_t *str_b, unsigned __int16 count_b) static inline int CompareName(LCID locale, const wchar_t *str_a, unsigned __int16 count_a, const wchar_t *str_b, unsigned __int16 count_b)
{ {
switch (CompareString(locale, LINGUISTIC_IGNORECASE | LINGUISTIC_IGNOREDIACRITIC | NORM_LINGUISTIC_CASING | NORM_IGNOREWIDTH, str_a, count_a, str_b, count_b)) { switch (CompareString(locale, SORT_STRINGSORT | NORM_IGNORECASE, str_a, count_a, str_b, count_b)) {
case CSTR_LESS_THAN : return -1; case CSTR_LESS_THAN : return -1;
case CSTR_EQUAL : return 0; case CSTR_EQUAL : return 0;
case CSTR_GREATER_THAN: return 1; case CSTR_GREATER_THAN: return 1;