[gvar] Optimize translate()

This commit is contained in:
Behdad Esfahbod committed 2022-06-27 12:10:16 -06:00
1 parent 9f067582b8
commit 95bfa0913d
1 file changed
+4 -2
+4 -2
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);
}
};