[gvar] Micro-optimize

This commit is contained in:
Behdad Esfahbod 2022-11-22 11:14:56 -07:00
parent 1758ee6646
commit 49d4f62135
1 changed files with 2 additions and 2 deletions

View File

@ -624,12 +624,12 @@ struct gvar
unsigned start_point = 0;
for (unsigned c = 0; c < end_points.length; c++)
{
unsigned end_point = end_points[c];
unsigned end_point = end_points.arrayZ[c];
/* Check the number of unreferenced points in a contour. If no unref points or no ref points, nothing to do. */
unsigned unref_count = 0;
for (unsigned i = start_point; i <= end_point; i++)
if (!deltas[i].flag) unref_count++;
if (!deltas.arrayZ[i].flag) unref_count++;
unsigned j = start_point;
if (unref_count == 0 || unref_count > end_point - start_point)