mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 08:42:59 +00:00
[aat] Micro-optimize get_class
This commit is contained in:
parent
91572945bb
commit
ed37725e00
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue