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

Method shiftLeft

lib/mathlib.cpp:264–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264MathLib::value MathLib::value::shiftLeft(const MathLib::value &v) const
265{
266 if (!isInt() || !v.isInt())
267 throw InternalError(nullptr, "Shift operand is not integer");
268 MathLib::value ret(*this);
269 if (v.mIntValue >= MathLib::bigint_bits) {
270 return ret;
271 }
272 ret.mIntValue <<= v.mIntValue;
273 return ret;
274}
275
276MathLib::value MathLib::value::shiftRight(const MathLib::value &v) const
277{

Callers 1

operator<<Function · 0.80

Calls 1

isIntMethod · 0.45

Tested by

no test coverage detected