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

Method operator-

lib/infer.cpp:175–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 }
174
175 friend Interval operator-(const Interval& lhs, const Interval& rhs)
176 {
177 Interval result;
178 result.minvalue = Interval::apply(lhs.minvalue, rhs.maxvalue, std::minus<MathLib::bigint>{});
179 result.maxvalue = Interval::apply(lhs.maxvalue, rhs.minvalue, std::minus<MathLib::bigint>{});
180 if (!result.minvalue.empty())
181 result.minRef = merge(lhs.minRef, rhs.maxRef);
182 if (!result.maxvalue.empty())
183 result.maxRef = merge(lhs.maxRef, rhs.minRef);
184 return result;
185 }
186
187 static std::vector<int> equal(const Interval& lhs,
188 const Interval& rhs,

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected