| 678 | |
| 679 | |
| 680 | bool 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 | |
| 700 | bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) { |
nothing calls this directly
no test coverage detected