mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
[gvar] Optimize a loop
This commit is contained in:
1 parent
dd6fcec92c
commit
e8ddf107d0
1 file changed
+3
-2
@@ -646,8 +646,9 @@ struct gvar
|
||||
|
||||
/* 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++)
|
||||
unref_count += !deltas.arrayZ[i].flag;
|
||||
for (unsigned i = start_point; i < end_point + 1; i++)
|
||||
unref_count += deltas.arrayZ[i].flag;
|
||||
unref_count = (end_point - start_point + 1) - unref_count;
|
||||
|
||||
unsigned j = start_point;
|
||||
if (unref_count == 0 || unref_count > end_point - start_point)
|
||||
|
||||
Reference in new issue
Block a user