[buffer] HB_NODISCARD next_glyphs()
This commit is contained in:
parent
4ae8aab83b
commit
b05e5d9a79
|
@ -319,7 +319,7 @@ hb_buffer_t::swap_buffers ()
|
||||||
if (unlikely (!successful)) return;
|
if (unlikely (!successful)) return;
|
||||||
|
|
||||||
assert (idx <= len);
|
assert (idx <= len);
|
||||||
next_glyphs (len - idx);
|
if (unlikely (!next_glyphs (len - idx))) return;
|
||||||
|
|
||||||
assert (have_output);
|
assert (have_output);
|
||||||
have_output = false;
|
have_output = false;
|
||||||
|
|
|
@ -280,7 +280,7 @@ struct hb_buffer_t
|
||||||
}
|
}
|
||||||
/* Copies n glyphs at idx to output and advance idx.
|
/* Copies n glyphs at idx to output and advance idx.
|
||||||
* If there's no output, just advance idx. */
|
* If there's no output, just advance idx. */
|
||||||
bool next_glyphs (unsigned int n)
|
HB_NODISCARD bool next_glyphs (unsigned int n)
|
||||||
{
|
{
|
||||||
if (have_output)
|
if (have_output)
|
||||||
{
|
{
|
||||||
|
|
|
@ -348,7 +348,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
|
||||||
sizeof (buffer->info[0]),
|
sizeof (buffer->info[0]),
|
||||||
&buffer->cur().glyph_index(),
|
&buffer->cur().glyph_index(),
|
||||||
sizeof (buffer->info[0]));
|
sizeof (buffer->info[0]));
|
||||||
buffer->next_glyphs (done);
|
if (unlikely (!buffer->next_glyphs (done))) break;
|
||||||
}
|
}
|
||||||
while (buffer->idx < end && buffer->successful)
|
while (buffer->idx < end && buffer->successful)
|
||||||
decompose_current_character (&c, might_short_circuit);
|
decompose_current_character (&c, might_short_circuit);
|
||||||
|
|
Loading…
Reference in New Issue