MCPcopy Create free account
hub / github.com/DFHack/dfhack / bits_match

Function bits_match

library/include/MiscUtils.h:546–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544std::string grab_token_string_pos(const std::string& source, int32_t pos, char compc = ':');
545
546inline bool bits_match(unsigned required, unsigned ok, unsigned mask)
547{
548 return (required & mask) == (required & mask & ok);
549}
550
551template<typename T, typename T1, typename T2>
552inline T clip_range(T a, T1 minv, T2 maxv) {

Callers 2

matchesMethod · 0.85
matchesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected