MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / check

Method check

source/game/StarForceRegions.cpp:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 : type(type), categories(std::move(categories)) {}
17
18bool PhysicsCategoryFilter::check(StringSet const& otherCategories) const {
19 bool intersection = categories.hasIntersection(otherCategories);
20 if (type == Whitelist)
21 return intersection;
22 else
23 return !intersection;
24}
25
26bool PhysicsCategoryFilter::operator==(PhysicsCategoryFilter const& rhs) const {
27 return tie(type, categories) == tie(rhs.type, rhs.categories);

Callers 4

updateForceRegionsMethod · 0.45
changedMethod · 0.45
updateMethod · 0.45

Calls 1

hasIntersectionMethod · 0.80

Tested by

no test coverage detected