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

Method shiftRight

lib/mathlib.cpp:276–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276MathLib::value MathLib::value::shiftRight(const MathLib::value &v) const
277{
278 if (!isInt() || !v.isInt())
279 throw InternalError(nullptr, "Shift operand is not integer");
280 MathLib::value ret(*this);
281 if (v.mIntValue >= MathLib::bigint_bits) {
282 return ret;
283 }
284 ret.mIntValue >>= v.mIntValue;
285 return ret;
286}
287
288MathLib::biguint MathLib::toBigUNumber(const Token * tok)
289{

Callers 1

operator>>Function · 0.80

Calls 1

isIntMethod · 0.45

Tested by

no test coverage detected