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

Function sign

lib/checkcondition.cpp:959–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

957
958template<typename T>
959static int sign(const T v) {
960 return static_cast<int>(v > 0) - static_cast<int>(v < 0);
961}
962
963// returns 1 (-1) if the first (second) condition is sufficient, 0 if indeterminate
964template<typename T>

Callers 1

sufficientConditionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected