[gvar] Optimize translate()

This commit is contained in:
Behdad Esfahbod 2022-06-27 12:09:42 -06:00
parent 9f067582b8
commit 95bfa0913d
1 changed files with 4 additions and 2 deletions

View File

@ -84,8 +84,10 @@ struct contour_point_vector_t : hb_vector_t<contour_point_t>
{
if (delta.x == 0.f && delta.y == 0.f)
return;
for (unsigned int i = 0; i < length; i++)
(*this)[i].translate (delta);
auto arrayZ = this->arrayZ;
unsigned count = length;
for (unsigned i = 0; i < count; i++)
arrayZ[i].translate (delta);
}
};