MCPcopy Create free account
hub / github.com/JayXon/Leanify / ToBool

Method ToBool

lib/tinyxml2/tinyxml2.cpp:500–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500bool 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
519bool XMLUtil::ToFloat( const char* str, float* value )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected