Accept a ConstPtr in ContainerStore::getType

This commit is contained in:
scrawl 2015-12-18 17:03:49 +01:00
parent edde5bd065
commit e1c6261fee
2 changed files with 2 additions and 2 deletions

View file

@ -585,7 +585,7 @@ float MWWorld::ContainerStore::getWeight() const
return mCachedWeight; return mCachedWeight;
} }
int MWWorld::ContainerStore::getType (const Ptr& ptr) int MWWorld::ContainerStore::getType (const ConstPtr& ptr)
{ {
if (ptr.isEmpty()) if (ptr.isEmpty())
throw std::runtime_error ("can't put a non-existent object into a container"); throw std::runtime_error ("can't put a non-existent object into a container");

View file

@ -163,7 +163,7 @@ namespace MWWorld
float getWeight() const; float getWeight() const;
///< Return total weight of the items contained in *this. ///< Return total weight of the items contained in *this.
static int getType (const Ptr& ptr); static int getType (const ConstPtr& ptr);
///< This function throws an exception, if ptr does not point to an object, that can be ///< This function throws an exception, if ptr does not point to an object, that can be
/// put into a container. /// put into a container.