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

Method multiply

lib/mathlib.cpp:1172–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170}
1171
1172std::string MathLib::multiply(const std::string &first, const std::string &second)
1173{
1174#ifdef TEST_MATHLIB_VALUE
1175 return (value(first) * value(second)).str();
1176#else
1177 if (MathLib::isInt(first) && MathLib::isInt(second)) {
1178 return MathLib::toString(toBigNumber(first) * toBigNumber(second)) + intsuffix(first, second);
1179 }
1180 return toString(toDoubleNumber(first) * toDoubleNumber(second));
1181#endif
1182}
1183
1184std::string MathLib::mod(const std::string &first, const std::string &second)
1185{

Callers

nothing calls this directly

Calls 4

intsuffixFunction · 0.85
valueClass · 0.70
toStringFunction · 0.70
strMethod · 0.45

Tested by

no test coverage detected