From 6a6d8f85312c7031e680c110f191318f196edeb8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 26 Sep 2024 12:44:52 -0600 Subject: [PATCH] [MultiVarStore] Move code; no difference --- src/hb-ot-layout-common.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 90e95f70b..4b12efb2d 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3147,14 +3147,18 @@ struct MultiVarData float scalar = regions.evaluate (regionIndices.arrayZ[regionIndex], coords, coord_count, cache); + if (scalar == 0) + { + values_iter += count; + continue; + } + if (scalar == 1.f) for (unsigned i = 0; i < count; i++) out.arrayZ[i] += *values_iter++; - else if (scalar) + else for (unsigned i = 0; i < count; i++) out.arrayZ[i] += *values_iter++ * scalar; - else - values_iter += count; } }