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

Function checkFloatRelation

lib/checkcondition.cpp:1024–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022}
1023
1024static bool checkFloatRelation(const std::string &op, const double value1, const double value2)
1025{
1026 return (op == ">" && value1 > value2) ||
1027 (op == ">=" && value1 >= value2) ||
1028 (op == "<" && value1 < value2) ||
1029 (op == "<=" && value1 <= value2);
1030}
1031
1032template<class T>
1033static T getvalue3(const T value1, const T value2)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected