[cff-common] Use range-based loop in str_buff_vec_t

This commit is contained in:
Behdad Esfahbod committed 2022-05-09 17:34:58 -06:00
1 parent 8bb1a3ce9a
commit 258afb45b7
1 file changed
+2 -2
+2 -2
View File
@@ -58,8 +58,8 @@ struct str_buff_vec_t : hb_vector_t<str_buff_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;
}