From 96828b97a8fc2c50721ce040bdde63c462908791 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 25 Oct 2018 20:34:29 -0700 Subject: [PATCH] [layout] Minor We were returning the accelerator's lookup count. Returns table's. They are the same except for OOM cases. Just shorter code. --- src/hb-ot-layout.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 7e08c2a09..338ca6493 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -652,19 +652,7 @@ unsigned int hb_ot_layout_table_get_lookup_count (hb_face_t *face, hb_tag_t table_tag) { - if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return 0; - switch (table_tag) - { - case HB_OT_TAG_GSUB: - { - return hb_ot_face_data (face)->GSUB->lookup_count; - } - case HB_OT_TAG_GPOS: - { - return hb_ot_face_data (face)->GPOS->lookup_count; - } - } - return 0; + return get_gsubgpos_table (face, table_tag).get_lookup_count (); } static void