mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-12 16:23:01 +00:00
[set] Add a brute-force intersects(other_set)
This commit is contained in:
parent
80bbb0b2e9
commit
95eefa38f6
1 changed files with 7 additions and 0 deletions
|
@ -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); }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue