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

Function isSubset

src/e9tool/e9action.cpp:1854–1865  ·  view source on GitHub ↗

* Set subset. */

Source from the content-addressed store, hash-verified

1852 * Set subset.
1853 */
1854static bool isSubset(const MatchVal *set1, const MatchVal *set2)
1855{
1856 if (set1->type != MATCH_TYPE_SET)
1857 return false;
1858 const MatchVal *vals = set1->vals;
1859 for (size_t i = 0; vals[i].type != MATCH_TYPE_UNDEFINED; i++)
1860 {
1861 if (!isMember(&vals[i], set2))
1862 return false;
1863 }
1864 return true;
1865}
1866
1867/*
1868 * Set comparison.

Callers 1

matchDoEvalFunction · 0.85

Calls 1

isMemberFunction · 0.85

Tested by

no test coverage detected