mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[instancing] Micro-optimize a loop
This commit is contained in:
parent
29d49eced8
commit
59cfb4c570
1 changed files with 13 additions and 8 deletions
|
@ -516,14 +516,19 @@ struct tuple_delta_t
|
|||
return *this;
|
||||
|
||||
unsigned num = indices.length;
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
{
|
||||
if (!indices.arrayZ[i]) continue;
|
||||
|
||||
deltas_x[i] *= scalar;
|
||||
if (deltas_y)
|
||||
deltas_y[i] *= scalar;
|
||||
}
|
||||
if (deltas_y)
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
{
|
||||
if (!indices.arrayZ[i]) continue;
|
||||
deltas_x[i] *= scalar;
|
||||
deltas_y[i] *= scalar;
|
||||
}
|
||||
else
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
{
|
||||
if (!indices.arrayZ[i]) continue;
|
||||
deltas_x[i] *= scalar;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue