[iter] Add operator << to set / vector

This commit is contained in:
Behdad Esfahbod committed 2019-01-28 16:39:01 -05:00
1 parent d438e61042
commit a30e13469e
2 files changed
+6

No files matched your search

+3
View File
@@ -373,6 +373,9 @@ struct hb_set_t
/* Predicate. */
bool operator () (hb_codepoint_t k) const { return has (k); }
/* Sink interface. */
hb_set_t& operator << (hb_codepoint_t v) { add (v); return *this; }
bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
{
hb_codepoint_t c = first - 1;
+3
View File
@@ -89,6 +89,9 @@ struct hb_vector_t
explicit_operator bool () const { return length; }
/* Sink interface. */
hb_vector_t& operator << (const Type &v) { push (v); return *this; }
hb_array_t< Type> as_array () { return hb_array (arrayZ(), length); }
hb_array_t<const Type> as_array () const { return hb_array (arrayZ(), length); }