[subset-cff] Micro-optimize encode_byte
This commit is contained in:
parent
a23f820427
commit
0bf7d9eb4d
|
@ -43,7 +43,12 @@ struct str_encoder_t
|
|||
void reset () { buff.reset (); }
|
||||
|
||||
void encode_byte (unsigned char b)
|
||||
{ buff.push (b); }
|
||||
{
|
||||
if (likely ((signed) buff.length < buff.allocated))
|
||||
buff.arrayZ[buff.length++] = b;
|
||||
else
|
||||
buff.push (b);
|
||||
}
|
||||
|
||||
void encode_int (int v)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue