mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 18:13:53 +01:00
[iter] Add operator << to set / vector
This commit is contained in:
1 parent
d438e61042
commit
a30e13469e
2 files changed
+6
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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); }
|
||||
|
||||
|
||||
Reference in new issue
Block a user