MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / GetFloat

Method GetFloat

PanzerChasm/settings.cpp:239–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239float Settings::GetFloat( const char* const name, const float default_value ) const
240{
241 const auto it = map_.find( SettingsStringContainer(name) );
242 if( it == map_.cend() )
243 return default_value;
244
245 float val;
246 if( StrToFloat( (*it).second.data(), &val ) )
247 return val;
248 return default_value;
249}
250
251bool Settings::GetBool( const char* const name, const bool default_value ) const
252{

Callers 2

UpdateBrightnessMethod · 0.80

Calls 2

StrToFloatFunction · 0.85

Tested by

no test coverage detected