MCPcopy Create free account
hub / github.com/Kitware/CMake / PopulateVariable

Method PopulateVariable

Source/kwsys/CommandLineArguments.cxx:604–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604void CommandLineArguments::PopulateVariable(bool* variable,
605 std::string const& value)
606{
607 if (value == "1" || value == "ON" || value == "on" || value == "On" ||
608 value == "TRUE" || value == "true" || value == "True" ||
609 value == "yes" || value == "Yes" || value == "YES") {
610 *variable = true;
611 } else {
612 *variable = false;
613 }
614}
615
616void CommandLineArguments::PopulateVariable(int* variable,
617 std::string const& value)

Callers 1

ParseMethod · 0.95

Calls 3

c_strMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected