| 498 | } |
| 499 | |
| 500 | bool XMLUtil::ToBool( const char* str, bool* value ) |
| 501 | { |
| 502 | int ival = 0; |
| 503 | if ( ToInt( str, &ival )) { |
| 504 | *value = (ival==0) ? false : true; |
| 505 | return true; |
| 506 | } |
| 507 | if ( StringEqual( str, "true" ) ) { |
| 508 | *value = true; |
| 509 | return true; |
| 510 | } |
| 511 | else if ( StringEqual( str, "false" ) ) { |
| 512 | *value = false; |
| 513 | return true; |
| 514 | } |
| 515 | return false; |
| 516 | } |
| 517 | |
| 518 | |
| 519 | bool XMLUtil::ToFloat( const char* str, float* value ) |
nothing calls this directly
no outgoing calls
no test coverage detected