| 670 | |
| 671 | |
| 672 | bool XMLUtil::ToInt64(const char* str, int64_t* value) |
| 673 | { |
| 674 | if (IsPrefixHex(str)) { |
| 675 | unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llx |
| 676 | if (TIXML_SSCANF(str, "%llx", &v) == 1) { |
| 677 | *value = static_cast<int64_t>(v); |
| 678 | return true; |
| 679 | } |
| 680 | } |
| 681 | else { |
| 682 | long long v = 0; // horrible syntax trick to make the compiler happy about %lld |
| 683 | if (TIXML_SSCANF(str, "%lld", &v) == 1) { |
| 684 | *value = static_cast<int64_t>(v); |
| 685 | return true; |
| 686 | } |
| 687 | } |
| 688 | return false; |
| 689 | } |
| 690 | |
| 691 | |
| 692 | bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) { |
nothing calls this directly
no test coverage detected