MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / ToInt

Method ToInt

native/thirdpart/tinyxml2/tinyxml2.cpp:611–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611bool XMLUtil::ToInt(const char* str, int* value)
612{
613 if (IsPrefixHex(str)) {
614 unsigned v;
615 if (TIXML_SSCANF(str, "%x", &v) == 1) {
616 *value = static_cast<int>(v);
617 return true;
618 }
619 }
620 else {
621 if (TIXML_SSCANF(str, "%d", value) == 1) {
622 return true;
623 }
624 }
625 return false;
626}
627
628bool XMLUtil::ToUnsigned(const char* str, unsigned* value)
629{

Callers

nothing calls this directly

Calls 1

IsPrefixHexFunction · 0.85

Tested by

no test coverage detected