Accept a ConstPtr in ContainerStore::getType

openmw-38
scrawl 9 years ago
parent edde5bd065
commit e1c6261fee

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

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

Loading…
Cancel
Save