mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: IniGroup::GetItem() can now be const. (#10966)
This commit is contained in:
parent
f249715db3
commit
9fa1984ef0
|
@ -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…
Reference in New Issue