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

Method ToInt64

native/thirdpart/tinyxml2/tinyxml2.cpp:680–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678
679
680bool XMLUtil::ToInt64(const char* str, int64_t* value)
681{
682 if (IsPrefixHex(str)) {
683 unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llx
684 if (TIXML_SSCANF(str, "%llx", &v) == 1) {
685 *value = static_cast<int64_t>(v);
686 return true;
687 }
688 }
689 else {
690 long long v = 0; // horrible syntax trick to make the compiler happy about %lld
691 if (TIXML_SSCANF(str, "%lld", &v) == 1) {
692 *value = static_cast<int64_t>(v);
693 return true;
694 }
695 }
696 return false;
697}
698
699
700bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) {

Callers

nothing calls this directly

Calls 1

IsPrefixHexFunction · 0.85

Tested by

no test coverage detected