[buffer] HB_NODISCARD copy_glyph()

pull/2900/head
Behdad Esfahbod 4 years ago
parent b05e5d9a79
commit 2a0dbb3ee5
  1. 4
      src/hb-aat-layout-morx-table.hh
  2. 2
      src/hb-buffer.hh

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

@ -252,7 +252,7 @@ struct hb_buffer_t
return true; return true;
} }
/* Copies glyph at idx to output but doesn't advance idx */ /* 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; if (unlikely (!make_room_for (0, 1))) return false;

Loading…
Cancel
Save