From ed37725e00a94fa4fa730a5e973eac23374ab8c4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 3 Feb 2025 12:59:58 +0000 Subject: [PATCH] [aat] Micro-optimize get_class --- src/hb-aat-layout-common.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index eab51eb3f..76aa690b5 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -644,9 +644,9 @@ struct StateTable unsigned int num_glyphs, hb_aat_class_cache_t *cache = nullptr) const { - if (unlikely (glyph_id == DELETED_GLYPH)) return CLASS_DELETED_GLYPH; unsigned klass; if (cache && cache->get (glyph_id, &klass)) return klass; + if (unlikely (glyph_id == DELETED_GLYPH)) return CLASS_DELETED_GLYPH; klass = (this+classTable).get_class (glyph_id, num_glyphs, CLASS_OUT_OF_BOUNDS); if (cache) cache->set (glyph_id, klass); return klass;