MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / GetBooleanValue

Method GetBooleanValue

Source/Utility/IniFile.cpp:48–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 virtual const char * GetValue() const { return mValue.c_str(); }
47
48 virtual bool GetBooleanValue( bool default_value ) const
49 {
50 const char * str( mValue.c_str() );
51
52 if( _strcmpi( str, "yes" ) == 0 ||
53 _strcmpi( str, "true" ) == 0 ||
54 _strcmpi( str, "1" ) == 0 ||
55 _strcmpi( str, "on" ) == 0 )
56 {
57 return true;
58 }
59 if( _strcmpi( str, "no" ) == 0 ||
60 _strcmpi( str, "false" ) == 0 ||
61 _strcmpi( str, "0" ) == 0 ||
62 _strcmpi( str, "off" ) == 0 )
63 {
64 return false;
65 }
66
67 return default_value;
68 }
69
70 virtual int GetIntValue( int default_value ) const
71 {

Callers 2

OpenPreferencesFileMethod · 0.80
OpenSettingsFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected