[buffer] HB_NODISCARD copy_glyph()

This commit is contained in:
Behdad Esfahbod 2021-03-15 14:10:39 -06:00
parent b05e5d9a79
commit 2a0dbb3ee5
2 changed files with 3 additions and 3 deletions

View File

@ -736,7 +736,7 @@ struct InsertionSubtable
if (unlikely (!buffer->move_to (mark))) return;
if (buffer->idx < buffer->len && !before)
buffer->copy_glyph ();
if (unlikely (!buffer->copy_glyph ())) return;
/* TODO We ignore KashidaLike setting. */
for (unsigned int i = 0; i < count; i++)
buffer->output_glyph (glyphs[i]);
@ -764,7 +764,7 @@ struct InsertionSubtable
unsigned int end = buffer->out_len;
if (buffer->idx < buffer->len && !before)
buffer->copy_glyph ();
if (unlikely (!buffer->copy_glyph ())) return;
/* TODO We ignore KashidaLike setting. */
for (unsigned int i = 0; i < count; i++)
buffer->output_glyph (glyphs[i]);

View File

@ -252,7 +252,7 @@ struct hb_buffer_t
return true;
}
/* Copies glyph at idx to output but doesn't advance idx */
bool copy_glyph ()
HB_NODISCARD bool copy_glyph ()
{
if (unlikely (!make_room_for (0, 1))) return false;