Accept a ConstPtr in InventoryStore::isEquipped

This commit is contained in:
scrawl 2015-12-18 17:06:58 +01:00
parent 3856f931db
commit f35ab12979
2 changed files with 2 additions and 2 deletions

View file

@ -742,7 +742,7 @@ void MWWorld::InventoryStore::clear()
ContainerStore::clear(); ContainerStore::clear();
} }
bool MWWorld::InventoryStore::isEquipped(const MWWorld::Ptr &item) bool MWWorld::InventoryStore::isEquipped(const MWWorld::ConstPtr &item)
{ {
for (int i=0; i < MWWorld::InventoryStore::Slots; ++i) for (int i=0; i < MWWorld::InventoryStore::Slots; ++i)
{ {

View file

@ -141,7 +141,7 @@ namespace MWWorld
void equip (int slot, const ContainerStoreIterator& iterator, const Ptr& actor); void equip (int slot, const ContainerStoreIterator& iterator, const Ptr& actor);
///< \warning \a iterator can not be an end()-iterator, use unequip function instead ///< \warning \a iterator can not be an end()-iterator, use unequip function instead
bool isEquipped(const MWWorld::Ptr& item); bool isEquipped(const MWWorld::ConstPtr& item);
///< Utility function, returns true if the given item is equipped in any slot ///< Utility function, returns true if the given item is equipped in any slot
void setSelectedEnchantItem(const ContainerStoreIterator& iterator); void setSelectedEnchantItem(const ContainerStoreIterator& iterator);