1
0
mirror of https://github.com/benhoyt/inih.git synced 2025-01-17 22:22:53 +08:00

Fixed cppcheck warnings (#65)

* Fixed cppcheck warnings

* Update from feedback

Update from feedback
This commit is contained in:
Fredrik Blix 2018-07-10 14:32:03 +02:00 committed by Ben Hoyt
parent 804c45b069
commit 5b0e675a4d
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ string INIReader::MakeKey(const string& section, const string& name)
int INIReader::ValueHandler(void* user, const char* section, const char* name,
const char* value)
{
INIReader* reader = (INIReader*)user;
INIReader* reader = static_cast<INIReader*>(user);
string key = MakeKey(section, name);
if (reader->_values[key].size() > 0)
reader->_values[key] += "\n";

View File

@ -18,7 +18,7 @@ class INIReader
public:
// Construct INIReader and parse given filename. See ini.h for more info
// about the parsing.
INIReader(const std::string& filename);
explicit INIReader(const std::string& filename);
// Return the result of ini_parse(), i.e., 0 on success, line number of
// first error on parse error, or -1 on file open error.