[HarfBuzz] harfbuzz-ng: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Jan 18 19:33:00 PST 2012
src/hb-icu.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 889caa52fa1bef61013ec1d127f84d7d5907ef1e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Jan 18 22:32:52 2012 -0500
[icu] Use U_FAILURE
diff --git a/src/hb-icu.cc b/src/hb-icu.cc
index 5cf09b2..5cd0143 100644
--- a/src/hb-icu.cc
+++ b/src/hb-icu.cc
@@ -158,7 +158,7 @@ hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
UErrorCode status = U_ZERO_ERROR;
UScriptCode scriptCode = uscript_getScript(unicode, &status);
- if (unlikely (status != U_ZERO_ERROR))
+ if (unlikely (U_FAILURE (status)))
return HB_SCRIPT_UNKNOWN;
return hb_icu_script_to_script (scriptCode);
@@ -188,7 +188,7 @@ hb_icu_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
icu_err = U_ZERO_ERROR;
len = unorm_normalize (utf16, len, UNORM_NFC, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
- if (icu_err)
+ if (U_FAILURE (icu_err))
return FALSE;
if (u_countChar32 (normalized, len) == 1) {
U16_GET_UNSAFE (normalized, 0, *ab);
@@ -223,7 +223,7 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
icu_err = U_ZERO_ERROR;
len = unorm_normalize (utf16, len, UNORM_NFD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
- if (icu_err)
+ if (U_FAILURE (icu_err))
return FALSE;
len = u_countChar32 (normalized, len);
@@ -243,7 +243,7 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
UChar recomposed[20];
icu_err = U_ZERO_ERROR;
unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
- if (icu_err)
+ if (U_FAILURE (icu_err))
return FALSE;
hb_codepoint_t c;
U16_GET_UNSAFE (recomposed, 0, c);
@@ -259,7 +259,7 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
UChar recomposed[20];
icu_err = U_ZERO_ERROR;
len = unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
- if (icu_err)
+ if (U_FAILURE (icu_err))
return FALSE;
/* We expect that recomposed has exactly one character now. */
U16_GET_UNSAFE (recomposed, 0, *a);
More information about the HarfBuzz
mailing list