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

pull/603/head
PeterN 1 year ago committed by GitHub
parent f249715db3
commit 9fa1984ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

@ -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();

Loading…
Cancel
Save