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

Function intsuffix

lib/mathlib.cpp:1084–1100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1082}
1083
1084static std::string intsuffix(const std::string & first, const std::string & second)
1085{
1086 const std::string suffix1 = MathLib::getSuffix(first);
1087 const std::string suffix2 = MathLib::getSuffix(second);
1088 if (suffix1 == "ULL" || suffix2 == "ULL")
1089 return "ULL";
1090 if (suffix1 == "LL" || suffix2 == "LL")
1091 return "LL";
1092 if (suffix1 == "UL" || suffix2 == "UL")
1093 return "UL";
1094 if (suffix1 == "L" || suffix2 == "L")
1095 return "L";
1096 if (suffix1 == "U" || suffix2 == "U")
1097 return "U";
1098
1099 return suffix1.empty() ? suffix2 : suffix1;
1100}
1101
1102std::string MathLib::add(const std::string & first, const std::string & second)
1103{

Callers 6

addMethod · 0.85
subtractMethod · 0.85
divideMethod · 0.85
multiplyMethod · 0.85
modMethod · 0.85
calculateMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected