Use HB_SET_VALUE_INVALID consistently

This commit is contained in:
Behdad Esfahbod 2018-02-21 00:35:23 -08:00
parent 2cc845f311
commit eada749e46
2 changed files with 4 additions and 4 deletions

View File

@ -1057,7 +1057,7 @@ struct ClassDefFormat1
if (klass == 0)
{
/* 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))
return false;
if (g < startGlyph)
@ -1128,7 +1128,7 @@ struct ClassDefFormat2
if (klass == 0)
{
/* 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++)
{
if (!hb_set_next (glyphs, &g))
@ -1137,7 +1137,7 @@ struct ClassDefFormat2
return true;
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;
/* Fall through. */
}

View File

@ -957,7 +957,7 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
hb_set_t *copy = hb_set_create ();
do {
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);
} while (!copy->is_equal (glyphs));
hb_set_destroy (copy);