[glyf] Micro-optimize encode_flag()
This commit is contained in:
parent
d47cfe7936
commit
b6694597f9
|
@ -243,13 +243,14 @@ struct SimpleGlyph
|
||||||
repeat++;
|
repeat++;
|
||||||
if (repeat == 1)
|
if (repeat == 1)
|
||||||
{
|
{
|
||||||
flags.push(flag);
|
/* We know there's room. */
|
||||||
|
flags.arrayZ[flags.length++] = flag;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned len = flags.length;
|
unsigned len = flags.length;
|
||||||
flags[len-2] = flag | FLAG_REPEAT;
|
flags.arrayZ[len-2] = flag | FLAG_REPEAT;
|
||||||
flags[len-1] = repeat;
|
flags.arrayZ[len-1] = repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue