mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 09:34:05 +01:00
[subset/cff1] Micro-optimize
This commit is contained in:
1 parent
59387dbe43
commit
7b97262b03
1 file changed
+7
-2
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user