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:
parent
804c45b069
commit
5b0e675a4d
@ -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";
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user