提交 eada749e 编写于 作者: B Behdad Esfahbod

Use HB_SET_VALUE_INVALID consistently

上级 2cc845f3
...@@ -1057,7 +1057,7 @@ struct ClassDefFormat1 ...@@ -1057,7 +1057,7 @@ struct ClassDefFormat1
if (klass == 0) if (klass == 0)
{ {
/* Match if there's any glyph that is not listed! */ /* Match if there's any glyph that is not listed! */
hb_codepoint_t g = -1; hb_codepoint_t g = HB_SET_VALUE_INVALID;
if (!hb_set_next (glyphs, &g)) if (!hb_set_next (glyphs, &g))
return false; return false;
if (g < startGlyph) if (g < startGlyph)
...@@ -1128,7 +1128,7 @@ struct ClassDefFormat2 ...@@ -1128,7 +1128,7 @@ struct ClassDefFormat2
if (klass == 0) if (klass == 0)
{ {
/* Match if there's any glyph that is not listed! */ /* Match if there's any glyph that is not listed! */
hb_codepoint_t g = (hb_codepoint_t) -1; hb_codepoint_t g = HB_SET_VALUE_INVALID;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
if (!hb_set_next (glyphs, &g)) if (!hb_set_next (glyphs, &g))
...@@ -1137,7 +1137,7 @@ struct ClassDefFormat2 ...@@ -1137,7 +1137,7 @@ struct ClassDefFormat2
return true; return true;
g = rangeRecord[i].end; g = rangeRecord[i].end;
} }
if (g != (hb_codepoint_t) -1 && hb_set_next (glyphs, &g)) if (g != HB_SET_VALUE_INVALID && hb_set_next (glyphs, &g))
return true; return true;
/* Fall through. */ /* Fall through. */
} }
......
...@@ -957,7 +957,7 @@ hb_ot_shape_glyphs_closure (hb_font_t *font, ...@@ -957,7 +957,7 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
hb_set_t *copy = hb_set_create (); hb_set_t *copy = hb_set_create ();
do { do {
copy->set (glyphs); copy->set (glyphs);
for (hb_codepoint_t lookup_index = -1; hb_set_next (lookups, &lookup_index);) for (hb_codepoint_t lookup_index = HB_SET_VALUE_INVALID; hb_set_next (lookups, &lookup_index);)
hb_ot_layout_lookup_substitute_closure (font->face, lookup_index, glyphs); hb_ot_layout_lookup_substitute_closure (font->face, lookup_index, glyphs);
} while (!copy->is_equal (glyphs)); } while (!copy->is_equal (glyphs));
hb_set_destroy (copy); hb_set_destroy (copy);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册