mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[set] Add a brute-force intersects(other_set)
This commit is contained in:
1 parent
80bbb0b2e9
commit
95eefa38f6
1 file changed
+7
@@ -120,6 +120,13 @@ struct hb_sparseset_t
|
||||
hb_sparseset_t& operator << (const hb_codepoint_pair_t& range)
|
||||
{ add_range (range.first, range.second); return *this; }
|
||||
|
||||
bool intersects (const hb_set_t &other) const
|
||||
{
|
||||
hb_sparseset_t tmp = *this;
|
||||
tmp.intersect (other);
|
||||
return !tmp.is_empty ();
|
||||
}
|
||||
|
||||
bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
|
||||
{ return s.intersects (first, last); }
|
||||
|
||||
|
||||
Reference in new issue
Block a user