MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / max_value

Function max_value

lib/platform.h:55–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 static long long max_value(std::uint8_t bit) {
56 assert(bit > 0);
57 if (bit >= 64)
58 return (~0ULL) >> 1;
59 return (1LL << (bit-1)) - 1LL;
60 }
61
62 static unsigned long long max_value_unsigned(std::uint8_t bit) {
63 assert(bit > 0);

Callers 6

getLimitsDefinesMethod · 0.85
isIntValueFunction · 0.85
isLongValueFunction · 0.85
isLongLongValueFunction · 0.85
unsignedCharMaxFunction · 0.85
signedCharMaxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected