[glyf] Micro-optimize encode_coord

This commit is contained in:
Behdad Esfahbod 2022-11-22 14:51:42 -07:00
parent b6694597f9
commit 024aa81805
1 changed files with 3 additions and 3 deletions

View File

@ -223,13 +223,13 @@ struct SimpleGlyph
if (value > 0) flag |= same_flag;
else value = -value;
coords.push ((uint8_t)value);
coords.arrayZ[coords.length++] = (uint8_t) value;
}
else
{
int16_t val = value;
coords.push (val >> 8);
coords.push (val & 0xff);
coords.arrayZ[coords.length++] = val >> 8;
coords.arrayZ[coords.length++] = val & 0xff;
}
}