This commit is contained in:
Behdad Esfahbod 2012-08-31 16:29:17 -04:00
parent 784f29d061
commit 1be368e96f
2 changed files with 15 additions and 16 deletions

View File

@ -156,7 +156,21 @@ struct hb_buffer_t {
HB_INTERNAL void copy_glyph (void);
/* Copies glyph at idx to output and advance idx.
* If there's no output, just advance idx. */
HB_INTERNAL void next_glyph (void);
inline void
next_glyph (void)
{
if (have_output)
{
if (unlikely (out_info != info || out_len != idx)) {
if (unlikely (!make_room_for (1, 1))) return;
out_info[out_len] = info[idx];
}
out_len++;
}
idx++;
}
/* Advance idx without copying to output. */
inline void skip_glyph (void) { idx++; }

View File

@ -290,21 +290,6 @@ hb_buffer_t::replace_glyph (hb_codepoint_t glyph_index)
out_len++;
}
void
hb_buffer_t::next_glyph (void)
{
if (have_output)
{
if (unlikely (out_info != info || out_len != idx)) {
if (unlikely (!make_room_for (1, 1))) return;
out_info[out_len] = info[idx];
}
out_len++;
}
idx++;
}
void
hb_buffer_t::set_masks (hb_mask_t value,