mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 07:21:53 +00:00
Codechange: Accept std::string in RemoveGroup().
This commit is contained in:
parent
bb6fa9bf3b
commit
3961318974
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user