mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[aat] Micro-optimize get_class
This commit is contained in:
1 parent
91572945bb
commit
ed37725e00
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user