[VarRegionAxis] Micro-optimize
peak==0 is common.
diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh
index 619e7c4..52b7dc2 100644
--- a/src/hb-ot-layout-common.hh
+++ b/src/hb-ot-layout-common.hh
@@ -2272,7 +2272,11 @@
{
float evaluate (int coord) const
{
- int start = startCoord.to_int (), peak = peakCoord.to_int (), end = endCoord.to_int ();
+ int peak = peakCoord.to_int ();
+ if (peak == 0 || coord == peak)
+ return 1.f;
+
+ int start = startCoord.to_int (), end = endCoord.to_int ();
/* TODO Move these to sanitize(). */
if (unlikely (start > peak || peak > end))
@@ -2280,9 +2284,6 @@
if (unlikely (start < 0 && end > 0 && peak != 0))
return 1.f;
- if (peak == 0 || coord == peak)
- return 1.f;
-
if (coord <= start || end <= coord)
return 0.f;