From 449bdeed5f2272ebe1176fa371833941a98b1e8f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 25 Jun 2022 18:31:31 -0600 Subject: [PATCH] [glyf] Rename get_iterator() to iter() That's the standard name. --- src/OT/glyf/CompositeGlyph.hh | 8 ++++---- src/OT/glyf/Glyph.hh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/OT/glyf/CompositeGlyph.hh b/src/OT/glyf/CompositeGlyph.hh index e24cefa72..d9bb06f02 100644 --- a/src/OT/glyf/CompositeGlyph.hh +++ b/src/OT/glyf/CompositeGlyph.hh @@ -25,7 +25,7 @@ struct CompositeGlyphChain USE_MY_METRICS = 0x0200, OVERLAP_COMPOUND = 0x0400, SCALED_COMPONENT_OFFSET = 0x0800, - UNSCALED_COMPONENT_OFFSET = 0x1000 + UNSCALED_COMPONENT_OFFSET = 0x1000 }; public: @@ -211,7 +211,7 @@ struct CompositeGlyph CompositeGlyph (const GlyphHeader &header_, hb_bytes_t bytes_) : header (header_), bytes (bytes_) {} - composite_iter_t get_iterator () const + composite_iter_t iter () const { return composite_iter_t (bytes, &StructAfter (header)); } unsigned int instructions_length (hb_bytes_t bytes) const @@ -219,7 +219,7 @@ struct CompositeGlyph unsigned int start = bytes.length; unsigned int end = bytes.length; const CompositeGlyphChain *last = nullptr; - for (auto &item : get_iterator ()) + for (auto &item : iter ()) last = &item; if (unlikely (!last)) return 0; @@ -235,7 +235,7 @@ struct CompositeGlyph void drop_hints () { - for (const auto &_ : get_iterator ()) + for (const auto &_ : iter ()) const_cast (_).drop_instructions_flag (); } diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 5f503768d..5aac0f882 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -33,7 +33,7 @@ struct Glyph composite_iter_t get_composite_iterator () const { if (type != COMPOSITE) return composite_iter_t (); - return CompositeGlyph (*header, bytes).get_iterator (); + return CompositeGlyph (*header, bytes).iter (); } const hb_bytes_t trim_padding () const @@ -88,7 +88,7 @@ struct Glyph case COMPOSITE: { /* pseudo component points for each component in composite glyph */ - unsigned num_points = hb_len (CompositeGlyph (*header, bytes).get_iterator ()); + unsigned num_points = hb_len (CompositeGlyph (*header, bytes).iter ()); if (unlikely (!points.resize (num_points))) return false; for (unsigned i = 0; i < points.length; i++) points[i].init ();