Codechange: IniGroup::GetItem() can now be const. (#10966)

This commit is contained in:
PeterN 2023-06-06 23:39:37 +01:00 committed by GitHub
parent f249715db3
commit 9fa1984ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ IniGroup::~IniGroup()
* @param name name of the item to find.
* @return the requested item or nullptr if not found.
*/
IniItem *IniGroup::GetItem(const std::string &name)
IniItem *IniGroup::GetItem(const std::string &name) const
{
for (IniItem *item = this->item; item != nullptr; item = item->next) {
if (item->name == name) return item;

View File

@ -44,7 +44,7 @@ struct IniGroup {
IniGroup(struct IniLoadFile *parent, const std::string &name);
~IniGroup();
IniItem *GetItem(const std::string &name);
IniItem *GetItem(const std::string &name) const;
IniItem &GetOrCreateItem(const std::string &name);
void RemoveItem(const std::string &name);
void Clear();