mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Implement set_is_member.
Oops, forgot that one.
This commit is contained in:
parent
7853bf1859
commit
d2fab28d01
1 changed files with 8 additions and 0 deletions
|
@ -235,3 +235,11 @@ set_is_subset (const set_t *set, const set_t *sub)
|
|||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
set_is_member (const set_t *set, unsigned x)
|
||||
{
|
||||
if (x >= set->size)
|
||||
return 0;
|
||||
return (set->map[x / BITS] & (1 << (x % BITS))) != 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue