diff options
Diffstat (limited to 'engines/pink/objects/inventory.cpp')
-rw-r--r-- | engines/pink/objects/inventory.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp index 66dbd400c0..d62530c553 100644 --- a/engines/pink/objects/inventory.cpp +++ b/engines/pink/objects/inventory.cpp @@ -63,11 +63,12 @@ void InventoryMgr::deserialize(Archive &archive) { } InventoryItem *InventoryMgr::findInventoryItem(const Common::String &name) { - auto it = Common::find_if(_items.begin(), _items.end(), [&name] - (InventoryItem *item) { - return name == item->getName(); - });; - return it != _items.end() ? *it : nullptr; + for (uint i = 0; i < _items.size(); ++i) { + if (_items[i]->getName() == name) { + return _items[i]; + } + } + return nullptr; } void InventoryMgr::setLeadActor(LeadActor *lead) { |