Merge pull request #1418 from gvictor/replace_icu_deprecated

Replace @Deprecated ICU API - USCRIPT_CODE_LIMIT
This commit is contained in:
Behdad Esfahbod 2018-11-29 10:39:18 -05:00 committed by GitHub
commit 0bcb1de126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ hb_icu_script_from_script (hb_script_t script)
if (unlikely (script == HB_SCRIPT_INVALID)) if (unlikely (script == HB_SCRIPT_INVALID))
return USCRIPT_INVALID_CODE; return USCRIPT_INVALID_CODE;
for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; i++) unsigned int maxScriptCode = u_getIntPropertyMaxValue(UCHAR_SCRIPT);
for (unsigned int i = 0; i <= maxScriptCode; i++)
if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script)) if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script))
return (UScriptCode) i; return (UScriptCode) i;