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

Method ToInt

externals/tinyxml2/tinyxml2.cpp:603–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603bool XMLUtil::ToInt(const char* str, int* value)
604{
605 if (IsPrefixHex(str)) {
606 unsigned v;
607 if (TIXML_SSCANF(str, "%x", &v) == 1) {
608 *value = static_cast<int>(v);
609 return true;
610 }
611 }
612 else {
613 if (TIXML_SSCANF(str, "%d", value) == 1) {
614 return true;
615 }
616 }
617 return false;
618}
619
620bool XMLUtil::ToUnsigned(const char* str, unsigned* value)
621{

Callers

nothing calls this directly

Calls 1

IsPrefixHexFunction · 0.85

Tested by

no test coverage detected