| 601 | } |
| 602 | |
| 603 | bool 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 | |
| 620 | bool XMLUtil::ToUnsigned(const char* str, unsigned* value) |
| 621 | { |
nothing calls this directly
no test coverage detected