diff --git a/src/ini_load.cpp b/src/ini_load.cpp index 69c29bc4ba..30344a144a 100644 --- a/src/ini_load.cpp +++ b/src/ini_load.cpp @@ -189,9 +189,9 @@ IniGroup *IniLoadFile::GetGroup(const std::string &name, bool create_new) * Remove the group with the given name. * @param name name of the group to remove. */ -void IniLoadFile::RemoveGroup(const char *name) +void IniLoadFile::RemoveGroup(const std::string &name) { - size_t len = strlen(name); + size_t len = name.length(); IniGroup *prev = nullptr; IniGroup *group; diff --git a/src/ini_type.h b/src/ini_type.h index 192ac8598e..e82aba24f2 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -62,7 +62,7 @@ struct IniLoadFile { virtual ~IniLoadFile(); IniGroup *GetGroup(const std::string &name, bool create_new = true); - void RemoveGroup(const char *name); + void RemoveGroup(const std::string &name); void LoadFromDisk(const std::string &filename, Subdirectory subdir);