diff --git a/src/hb-set.hh b/src/hb-set.hh index 73f3b5cd4..cd643e98d 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -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; diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 00f447901..d83719e45 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -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 as_array () const { return hb_array (arrayZ(), length); }