From 258afb45b7fefa42e36f74731d56862b9367f91e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 May 2022 15:40:55 -0600 Subject: [PATCH] [cff-common] Use range-based loop in str_buff_vec_t --- src/hb-ot-cff-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 88f2d7e4f..89f23b4b2 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -58,8 +58,8 @@ struct str_buff_vec_t : hb_vector_t unsigned int total_size () const { unsigned int size = 0; - for (unsigned int i = 0; i < length; i++) - size += (*this)[i].length; + for (const auto& v : *this ) + size += v.length; return size; }