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

Function stringToLL

externals/simplecpp/simplecpp.cpp:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118#endif
119
120static long long stringToLL(const std::string &s)
121{
122 long long ret;
123 const bool hex = isHex(s);
124 const bool oct = isOct(s);
125 std::istringstream istr(hex ? s.substr(2) : oct ? s.substr(1) : s);
126 if (hex)
127 istr >> std::hex;
128 else if (oct)
129 istr >> std::oct;
130 istr >> ret;
131 return ret;
132}
133
134static unsigned long long stringToULL(const std::string &s)
135{

Callers 8

constFoldMulDivRemMethod · 0.85
constFoldAddSubMethod · 0.85
constFoldShiftMethod · 0.85
constFoldComparisonMethod · 0.85
constFoldBitwiseMethod · 0.85
constFoldLogicalOpMethod · 0.85
evaluateFunction · 0.85

Calls 2

isHexFunction · 0.85
isOctFunction · 0.85

Tested by

no test coverage detected