From c13fc5579b9e66bedb4e8d4d41ff486f3c7ec8f6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 23 Mar 2024 09:49:03 -0600 Subject: [PATCH] [varc] Micro-optimize --- src/hb-ot-layout-common.hh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index d1b33fbc7..c722483fa 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3136,7 +3136,7 @@ struct MultiVarData { auto &deltaSets = StructAfter (regionIndices); - hb_vector_t values_vector = deltaSets[inner]; + hb_vector_t values_vector {deltaSets[inner]}; int *values = values_vector.arrayZ; unsigned regionCount = regionIndices.len; @@ -3148,12 +3148,8 @@ struct MultiVarData coords, coord_count, cache); if (scalar) - { for (unsigned i = 0; i < count; i++) - { - out[i] += values[i] * scalar; - } - } + out.arrayZ[i] += values[i] * scalar; values += tupleLength; } }