Skip to content

Commit

Permalink
Merge pull request #50 from jinstrong/master
Browse files Browse the repository at this point in the history
Update INIReader.cpp file
  • Loading branch information
benhoyt authored Jun 17, 2016
2 parents 0c3f8ea + 716cc04 commit 5dbf5cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/INIReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ int INIReader::ParseError() const
string INIReader::Get(string section, string name, string default_value) const
{
string key = MakeKey(section, name);
return _values.count(key) ? _values.at(key) : default_value;
// Use _values.find() here instead of _values.at() to support pre C++11 compilers
return _values.count(key) ? _values.find(key)->second : default_value;
}

long INIReader::GetInteger(string section, string name, long default_value) const
Expand Down

0 comments on commit 5dbf5cb

Please sign in to comment.