@@ -56,6 +56,16 @@ long INIReader::GetInteger(const string& section, const string& name, long defau
5656 return end > value ? n : default_value;
5757}
5858
59+ INI_API int64_t INIReader::GetInteger64 (const std::string& section, const std::string& name, int64_t default_value) const
60+ {
61+ string valstr = Get (section, name, " " );
62+ const char * value = valstr.c_str ();
63+ char * end;
64+ // This parses "1234" (decimal) and also "0x4D2" (hex)
65+ int64_t n = strtoll (value, &end, 0 );
66+ return end > value ? n : default_value;
67+ }
68+
5969unsigned long INIReader::GetUnsigned (const string& section, const string& name, unsigned long default_value) const
6070{
6171 string valstr = Get (section, name, " " );
@@ -66,6 +76,16 @@ unsigned long INIReader::GetUnsigned(const string& section, const string& name,
6676 return end > value ? n : default_value;
6777}
6878
79+ INI_API uint64_t INIReader::GetUnsigned64 (const std::string& section, const std::string& name, uint64_t default_value) const
80+ {
81+ string valstr = Get (section, name, " " );
82+ const char * value = valstr.c_str ();
83+ char * end;
84+ // This parses "1234" (decimal) and also "0x4D2" (hex)
85+ uint64_t n = strtoull (value, &end, 0 );
86+ return end > value ? n : default_value;
87+ }
88+
6989double INIReader::GetReal (const string& section, const string& name, double default_value) const
7090{
7191 string valstr = Get (section, name, " " );
0 commit comments