Codechange: Accept std::string in RemoveGroup().

This commit is contained in:
Peter Nelson 2023-10-11 12:31:12 +01:00 committed by Peter Nelson
parent bb6fa9bf3b
commit 3961318974
2 changed files with 3 additions and 3 deletions

View File

@ -189,9 +189,9 @@ IniGroup *IniLoadFile::GetGroup(const std::string &name, bool create_new)
* Remove the group with the given name. * Remove the group with the given name.
* @param name name of the group to remove. * @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 *prev = nullptr;
IniGroup *group; IniGroup *group;

View File

@ -62,7 +62,7 @@ struct IniLoadFile {
virtual ~IniLoadFile(); virtual ~IniLoadFile();
IniGroup *GetGroup(const std::string &name, bool create_new = true); 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); void LoadFromDisk(const std::string &filename, Subdirectory subdir);