Add set symmetric difference
This commit is contained in:
parent
27aba594c9
commit
62c3e111fc
|
@ -102,6 +102,11 @@ struct _hb_set_t
|
|||
for (unsigned int i = 0; i < ELTS; i++)
|
||||
elts[i] &= ~other->elts[i];
|
||||
}
|
||||
inline void symmetric_difference (const hb_set_t *other)
|
||||
{
|
||||
for (unsigned int i = 0; i < ELTS; i++)
|
||||
elts[i] ^= other->elts[i];
|
||||
}
|
||||
inline hb_codepoint_t get_min (void) const
|
||||
{
|
||||
for (unsigned int i = 0; i < ELTS; i++)
|
||||
|
|
|
@ -164,6 +164,13 @@ hb_set_subtract (hb_set_t *set,
|
|||
set->subtract (other);
|
||||
}
|
||||
|
||||
void
|
||||
hb_set_symmetric_difference (hb_set_t *set,
|
||||
hb_set_t *other)
|
||||
{
|
||||
set->symmetric_difference (other);
|
||||
}
|
||||
|
||||
hb_codepoint_t
|
||||
hb_set_min (hb_set_t *set)
|
||||
{
|
||||
|
|
|
@ -105,9 +105,15 @@ void
|
|||
hb_set_subtract (hb_set_t *set,
|
||||
hb_set_t *other);
|
||||
|
||||
void
|
||||
hb_set_symmetric_difference (hb_set_t *set,
|
||||
hb_set_t *other);
|
||||
|
||||
/* Undefined if set empty */
|
||||
hb_codepoint_t
|
||||
hb_set_min (hb_set_t *set);
|
||||
|
||||
/* Undefined if set empty */
|
||||
hb_codepoint_t
|
||||
hb_set_max (hb_set_t *set);
|
||||
|
||||
|
|
Loading…
Reference in New Issue