MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / ToBool

Method ToBool

sourcecommon/tinyxml2.cpp:445–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445bool XMLUtil::ToBool( const char* str, bool* value )
446{
447 int ival = 0;
448 if ( ToInt( str, &ival )) {
449 *value = (ival==0) ? false : true;
450 return true;
451 }
452 if ( StringEqual( str, "true" ) ) {
453 *value = true;
454 return true;
455 }
456 else if ( StringEqual( str, "false" ) ) {
457 *value = false;
458 return true;
459 }
460 return false;
461}
462
463
464bool XMLUtil::ToFloat( const char* str, float* value )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected