diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 89f23b4b2..17641aa68 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -57,14 +57,11 @@ struct str_buff_vec_t : hb_vector_t { unsigned int total_size () const { - unsigned int size = 0; - for (const auto& v : *this ) - size += v.length; - return size; + return + this->iter () + | hb_map (&str_buff_t::length) + | hb_reduce (hb_add, 0) + ; } - - private: - typedef hb_vector_t SUPER; }; /* CFF INDEX */