mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/cff1] Micro-optimize
This commit is contained in:
parent
59387dbe43
commit
7b97262b03
1 changed files with 7 additions and 2 deletions
|
@ -396,13 +396,18 @@ struct Charset1_2 {
|
|||
{
|
||||
if (unlikely (glyph >= num_glyphs)) return 0;
|
||||
if (unlikely (glyph == 0)) return 0;
|
||||
hb_codepoint_t start_glyph = 1;
|
||||
unsigned i = 0;
|
||||
unsigned i;
|
||||
hb_codepoint_t start_glyph;
|
||||
if (cache && likely (cache->glyph <= glyph))
|
||||
{
|
||||
i = cache->code;
|
||||
start_glyph = cache->glyph;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 0;
|
||||
start_glyph = 1;
|
||||
}
|
||||
glyph -= start_glyph;
|
||||
for (;; i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue