[iter] Change from const_iter_t/iter_t to iter_t/writer_t
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 9 Jan 2019 08:32:11 +0000 (00:32 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 21 Jan 2019 01:12:12 +0000 (20:12 -0500)
src/hb-open-type.hh
src/hb-vector.hh

index 42c3a19..e4ae435 100644 (file)
@@ -535,13 +535,12 @@ struct ArrayOf
   hb_array_t<const Type> as_array () const { return hb_array (arrayZ, len); }
 
   /* Iterator. */
-  typedef hb_array_t<const Type> const_iter_t;
-  typedef hb_array_t<      Type>       iter_t;
-  const_iter_t  iter () const { return as_array (); }
-  const_iter_t citer () const { return as_array (); }
-        iter_t  iter ()       { return as_array (); }
-  operator       iter_t ()       { return iter (); }
-  operator const_iter_t () const { return iter (); }
+  typedef hb_array_t<const Type>   iter_t;
+  typedef hb_array_t<      Type> writer_t;
+    iter_t   iter () const { return as_array (); }
+  writer_t writer ()       { return as_array (); }
+  operator   iter_t () const { return   iter (); }
+  operator writer_t ()       { return writer (); }
 
   hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
   { return as_array ().sub_array (start_offset, count);}
@@ -810,13 +809,12 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
   hb_sorted_array_t<const Type> as_array () const { return hb_sorted_array (this->arrayZ, this->len); }
 
   /* Iterator. */
-  typedef hb_sorted_array_t<const Type> const_iter_t;
-  typedef hb_sorted_array_t<      Type>       iter_t;
-  const_iter_t  iter () const { return as_array (); }
-  const_iter_t citer () const { return as_array (); }
-        iter_t  iter ()       { return as_array (); }
-  operator       iter_t ()       { return iter (); }
-  operator const_iter_t () const { return iter (); }
+  typedef hb_sorted_array_t<const Type>   iter_t;
+  typedef hb_sorted_array_t<      Type> writer_t;
+    iter_t   iter () const { return as_array (); }
+  writer_t writer ()       { return as_array (); }
+  operator   iter_t () const { return   iter (); }
+  operator writer_t ()       { return writer (); }
 
   hb_sorted_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
   { return as_array ().sub_array (start_offset, count);}
index d4c4858..27f4101 100644 (file)
@@ -93,13 +93,12 @@ struct hb_vector_t
   hb_array_t<const Type> as_array () const { return hb_array (arrayZ(), length); }
 
   /* Iterator. */
-  typedef hb_array_t<const Type> const_iter_t;
-  typedef hb_array_t<      Type>       iter_t;
-  const_iter_t  iter () const { return as_array (); }
-  const_iter_t citer () const { return as_array (); }
-        iter_t  iter ()       { return as_array (); }
-  operator       iter_t ()       { return iter (); }
-  operator const_iter_t () const { return iter (); }
+  typedef hb_array_t<const Type>   iter_t;
+  typedef hb_array_t<      Type> writer_t;
+    iter_t   iter () const { return as_array (); }
+  writer_t writer ()       { return as_array (); }
+  operator   iter_t () const { return   iter (); }
+  operator writer_t ()       { return writer (); }
 
   hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
   { return as_array ().sub_array (start_offset, count);}