Commit 3c98f8dd authored by scrawl's avatar scrawl

Accept a ConstPtr in isPersistent

parent 3fe30912
......@@ -554,9 +554,9 @@ namespace MWClass
return 0;
}
bool Creature::isPersistent(const MWWorld::Ptr &actor) const
bool Creature::isPersistent(const MWWorld::ConstPtr &actor) const
{
MWWorld::LiveCellRef<ESM::Creature>* ref = actor.get<ESM::Creature>();
const MWWorld::LiveCellRef<ESM::Creature>* ref = actor.get<ESM::Creature>();
return ref->mBase->mPersistent;
}
......
......@@ -88,7 +88,7 @@ namespace MWClass
virtual int getServices (const MWWorld::Ptr& actor) const;
virtual bool isPersistent (const MWWorld::Ptr& ptr) const;
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
virtual std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const;
......
......@@ -419,9 +419,9 @@ namespace MWClass
renderingInterface.getObjects().insertNPC(ptr);
}
bool Npc::isPersistent(const MWWorld::Ptr &actor) const
bool Npc::isPersistent(const MWWorld::ConstPtr &actor) const
{
MWWorld::LiveCellRef<ESM::NPC>* ref = actor.get<ESM::NPC>();
const MWWorld::LiveCellRef<ESM::NPC>* ref = actor.get<ESM::NPC>();
return ref->mBase->mPersistent;
}
......
......@@ -119,7 +119,7 @@ namespace MWClass
virtual int getServices (const MWWorld::Ptr& actor) const;
virtual bool isPersistent (const MWWorld::Ptr& ptr) const;
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
virtual std::string getSoundIdFromSndGen(const MWWorld::Ptr &ptr, const std::string &name) const;
......
......@@ -241,7 +241,7 @@ namespace MWWorld
return *iter->second;
}
bool Class::isPersistent(const Ptr &ptr) const
bool Class::isPersistent(const ConstPtr &ptr) const
{
throw std::runtime_error ("class does not support persistence");
}
......
......@@ -277,7 +277,7 @@ namespace MWWorld
virtual float getWeight (const MWWorld::ConstPtr& ptr) const;
virtual bool isPersistent (const MWWorld::Ptr& ptr) const;
virtual bool isPersistent (const MWWorld::ConstPtr& ptr) const;
virtual bool isKey (const MWWorld::ConstPtr& ptr) const { return false; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment