MCPcopy Create free account
hub / github.com/AHXR/ghost / GetInteger

Method GetInteger

_src/server/INIReader.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33long INIReader::GetInteger(const string& section, const string& name, long default_value) const
34{
35 string valstr = Get(section, name, "");
36 const char* value = valstr.c_str();
37 char* end;
38 // This parses "1234" (decimal) and also "0x4D2" (hex)
39 long n = strtol(value, &end, 0);
40 return end > value ? n : default_value;
41}
42
43double INIReader::GetReal(const string& section, const string& name, double default_value) const
44{

Callers 1

t_guiFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected