From 4167e93a1507d8fdefa37dba2044d9015f87ad78 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 26 Nov 2022 15:14:52 -0700 Subject: [PATCH] [subset-cff2] Micro-optimize blend operator --- src/hb-cff2-interp-cs.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index 4dfd1a114..dbad519d9 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -44,9 +44,10 @@ struct blend_arg_t : number_t { numValues = numValues_; valueIndex = valueIndex_; - deltas.resize (numBlends); + if (unlikely (!deltas.resize (numBlends))) + return; for (unsigned int i = 0; i < numBlends; i++) - deltas[i] = blends_[i]; + deltas.arrayZ[i] = blends_.arrayZ[i]; } bool blending () const { return deltas.length > 0; }