[glyf/composite_iter_t] Renames

pull/3681/head
Behdad Esfahbod 3 years ago
parent d15260ca95
commit a5ac7f2ea6
  1. 16
      src/OT/glyf/CompositeGlyph.hh

@ -160,41 +160,41 @@ struct composite_iter_t : hb_iter_with_fallback_t<composite_iter_t, const Compos
composite_iter_t (hb_bytes_t glyph_, __item_t__ current_) : composite_iter_t (hb_bytes_t glyph_, __item_t__ current_) :
glyph (glyph_), current (nullptr), current_size (0) glyph (glyph_), current (nullptr), current_size (0)
{ {
set_next (current_); set_current (current_);
} }
composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr), current_size (0) {} composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr), current_size (0) {}
const CompositeGlyphChain &__item__ () const { return *current; } item_t __item__ () const { return *current; }
bool __more__ () const { return current; } bool __more__ () const { return current; }
void __next__ () void __next__ ()
{ {
if (!current->has_more ()) { current = nullptr; return; } if (!current->has_more ()) { current = nullptr; return; }
set_next (&StructAtOffset<CompositeGlyphChain> (current, current_size)); set_current (&StructAtOffset<CompositeGlyphChain> (current, current_size));
} }
composite_iter_t __end__ () const { return composite_iter_t (); } composite_iter_t __end__ () const { return composite_iter_t (); }
bool operator != (const composite_iter_t& o) const bool operator != (const composite_iter_t& o) const
{ return current != o.current; } { return current != o.current; }
void set_next (const CompositeGlyphChain *composite) void set_current (__item_t__ current_)
{ {
if (!glyph.check_range (composite, CompositeGlyphChain::min_size)) if (!glyph.check_range (current_, CompositeGlyphChain::min_size))
{ {
current = nullptr; current = nullptr;
current_size = 0; current_size = 0;
return; return;
} }
unsigned size = composite->get_size (); unsigned size = current_->get_size ();
if (!glyph.check_range (composite, size)) if (!glyph.check_range (current_, size))
{ {
current = nullptr; current = nullptr;
current_size = 0; current_size = 0;
return; return;
} }
current = composite; current = current_;
current_size = size; current_size = size;
} }

Loading…
Cancel
Save