diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index 1a3ac708d..c8859c8a6 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -89,6 +89,8 @@ struct _hb_buffer_t { /* Other stuff */ unsigned int max_lig_id; + + inline unsigned int allocate_lig_id (void) { return max_lig_id++; } }; @@ -127,9 +129,6 @@ HB_INTERNAL void _hb_buffer_replace_glyph (hb_buffer_t *buffer, hb_codepoint_t glyph_index); -HB_INTERNAL unsigned short -_hb_buffer_allocate_lig_id (hb_buffer_t *buffer); - #ifndef BUFFER #define BUFFER buffer diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 9588d5e19..de7a2eb65 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -450,12 +450,6 @@ _hb_buffer_replace_glyph (hb_buffer_t *buffer, _hb_buffer_add_output_glyph (buffer, glyph_index, 0xFFFF, 0xFFFF); } -unsigned short -_hb_buffer_allocate_lig_id (hb_buffer_t *buffer) -{ - return ++buffer->max_lig_id; -} - unsigned int hb_buffer_get_length (hb_buffer_t *buffer) diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh index 849a20c1c..38364a541 100644 --- a/src/hb-ot-layout-gsub-private.hh +++ b/src/hb-ot-layout-gsub-private.hh @@ -404,10 +404,10 @@ struct Ligature 1, (const uint16_t *) &ligGlyph, 0, IN_LIGID (context->buffer->in_pos) && !IN_COMPONENT (context->buffer->in_pos) ? - 0xFFFF : _hb_buffer_allocate_lig_id (context->buffer)); + 0xFFFF : context->buffer->allocate_lig_id ()); else { - unsigned int lig_id = _hb_buffer_allocate_lig_id (context->buffer); + unsigned int lig_id = context->buffer->allocate_lig_id (); _hb_buffer_add_output_glyph (context->buffer, ligGlyph, 0xFFFF, lig_id); /* Now we must do a second loop to copy the skipped glyphs to