forked from mirror/openmw-tes3mp
Accept a ConstPtr in getItemsOwnedBy, getContainersOwnedBy
This commit is contained in:
parent
388aed1748
commit
029d467ea5
3 changed files with 8 additions and 8 deletions
|
@ -409,9 +409,9 @@ namespace MWBase
|
|||
|
||||
virtual float getWindSpeed() = 0;
|
||||
|
||||
virtual void getContainersOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out) = 0;
|
||||
virtual void getContainersOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
|
||||
///< get all containers in active cells owned by this Npc
|
||||
virtual void getItemsOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out) = 0;
|
||||
virtual void getItemsOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
|
||||
///< get all items in active cells owned by this Npc
|
||||
|
||||
virtual bool getLOS(const MWWorld::Ptr& actor,const MWWorld::Ptr& targetActor) = 0;
|
||||
|
|
|
@ -2260,13 +2260,13 @@ namespace MWWorld
|
|||
|
||||
struct GetContainersOwnedByVisitor
|
||||
{
|
||||
GetContainersOwnedByVisitor(const MWWorld::Ptr& owner, std::vector<MWWorld::Ptr>& out)
|
||||
GetContainersOwnedByVisitor(const MWWorld::ConstPtr& owner, std::vector<MWWorld::Ptr>& out)
|
||||
: mOwner(owner)
|
||||
, mOut(out)
|
||||
{
|
||||
}
|
||||
|
||||
MWWorld::Ptr mOwner;
|
||||
MWWorld::ConstPtr mOwner;
|
||||
std::vector<MWWorld::Ptr>& mOut;
|
||||
|
||||
bool operator()(const MWWorld::Ptr& ptr)
|
||||
|
@ -2281,7 +2281,7 @@ namespace MWWorld
|
|||
}
|
||||
};
|
||||
|
||||
void World::getContainersOwnedBy (const MWWorld::Ptr& owner, std::vector<MWWorld::Ptr>& out)
|
||||
void World::getContainersOwnedBy (const MWWorld::ConstPtr& owner, std::vector<MWWorld::Ptr>& out)
|
||||
{
|
||||
const Scene::CellStoreCollection& collection = mWorldScene->getActiveCells();
|
||||
for (Scene::CellStoreCollection::const_iterator cellIt = collection.begin(); cellIt != collection.end(); ++cellIt)
|
||||
|
@ -2303,7 +2303,7 @@ namespace MWWorld
|
|||
}
|
||||
};
|
||||
|
||||
void World::getItemsOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out)
|
||||
void World::getItemsOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out)
|
||||
{
|
||||
const Scene::CellStoreCollection& collection = mWorldScene->getActiveCells();
|
||||
for (Scene::CellStoreCollection::const_iterator cellIt = collection.begin(); cellIt != collection.end(); ++cellIt)
|
||||
|
|
|
@ -513,9 +513,9 @@ namespace MWWorld
|
|||
|
||||
virtual float getWindSpeed();
|
||||
|
||||
virtual void getContainersOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out);
|
||||
virtual void getContainersOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out);
|
||||
///< get all containers in active cells owned by this Npc
|
||||
virtual void getItemsOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out);
|
||||
virtual void getItemsOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out);
|
||||
///< get all items in active cells owned by this Npc
|
||||
|
||||
virtual bool getLOS(const MWWorld::Ptr& actor,const MWWorld::Ptr& targetActor);
|
||||
|
|
Loading…
Reference in a new issue