[ot-layout] Cosmetic
The implementation of HBUINT16 operator == is slower than just comparing to ints.
This commit is contained in:
parent
777debd748
commit
63c6695108
|
@ -2037,10 +2037,9 @@ struct ClassDefFormat1
|
||||||
}
|
}
|
||||||
/* TODO Speed up, using set overlap first? */
|
/* TODO Speed up, using set overlap first? */
|
||||||
/* TODO(iter) Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
HBUINT16 k {klass};
|
|
||||||
const HBUINT16 *arr = classValue.arrayZ;
|
const HBUINT16 *arr = classValue.arrayZ;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (arr[i] == k && glyphs->has (startGlyph + i))
|
if (arr[i] == klass && glyphs->has (startGlyph + i))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2272,10 +2271,9 @@ struct ClassDefFormat2
|
||||||
}
|
}
|
||||||
/* TODO Speed up, using set overlap first? */
|
/* TODO Speed up, using set overlap first? */
|
||||||
/* TODO(iter) Rewrite as dagger. */
|
/* TODO(iter) Rewrite as dagger. */
|
||||||
HBUINT16 k {klass};
|
|
||||||
const RangeRecord *arr = rangeRecord.arrayZ;
|
const RangeRecord *arr = rangeRecord.arrayZ;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (arr[i].value == k && arr[i].intersects (glyphs))
|
if (arr[i].value == klass && arr[i].intersects (glyphs))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue