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

Method GetInt

PanzerChasm/settings.cpp:227–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227int Settings::GetInt( const char* const name, const int default_value ) const
228{
229 const auto it= map_.find( SettingsStringContainer(name) );
230 if( it == map_.cend() )
231 return default_value;
232
233 int val;
234 if( StrToInt( (*it).second.data(), &val ) )
235 return val;
236 return default_value;
237}
238
239float Settings::GetFloat( const char* const name, const float default_value ) const
240{

Callers 6

SystemWindowMethod · 0.80
DrawMethod · 0.80
ProcessEventMethod · 0.80
VideoMenuMethod · 0.80
TickMethod · 0.80
GetAccelerationMethod · 0.80

Calls 2

StrToIntFunction · 0.85

Tested by

no test coverage detected