MCPcopy Create free account
hub / github.com/GJDuck/e9patch / isMember

Function isMember

src/e9tool/e9action.cpp:1838–1849  ·  view source on GitHub ↗

* Set membership. */

Source from the content-addressed store, hash-verified

1836 * Set membership.
1837 */
1838static bool isMember(const MatchVal *val, const MatchVal *set)
1839{
1840 if (set->type != MATCH_TYPE_SET)
1841 return false;
1842 const MatchVal *vals = set->vals;
1843 for (size_t i = 0; vals[i].type != MATCH_TYPE_UNDEFINED; i++)
1844 {
1845 if (*val == vals[i])
1846 return true;
1847 }
1848 return false;
1849}
1850
1851/*
1852 * Set subset.

Callers 3

isSubsetFunction · 0.85
setCompareFunction · 0.85
matchDoEvalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected