From 84d38df828e69e6ac1a796fc0460ba33e3bd3f29 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 21 Jul 2022 12:12:04 -0600 Subject: [PATCH] [Coverage] Minor use range-based loop --- src/OT/Layout/Common/CoverageFormat2.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OT/Layout/Common/CoverageFormat2.hh b/src/OT/Layout/Common/CoverageFormat2.hh index c7fc84129..3669d4fdc 100644 --- a/src/OT/Layout/Common/CoverageFormat2.hh +++ b/src/OT/Layout/Common/CoverageFormat2.hh @@ -154,9 +154,8 @@ struct CoverageFormat2_4 template bool collect_coverage (set_t *glyphs) const { - unsigned int count = rangeRecord.len; - for (unsigned int i = 0; i < count; i++) - if (unlikely (!rangeRecord[i].collect_coverage (glyphs))) + for (const auto& range: rangeRecord) + if (unlikely (!range.collect_coverage (glyphs))) return false; return true; }