mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Remove unused searchInContainers in WorldModel::getPtr
This commit is contained in:
parent
47b7c71c73
commit
1c2f24d1ca
3 changed files with 3 additions and 10 deletions
|
@ -680,7 +680,7 @@ namespace MWWorld
|
|||
{
|
||||
// TODO: caching still doesn't work efficiently here (only works for the one CellStore that the reference is
|
||||
// in)
|
||||
Ptr ptr = mWorldModel.getPtr(name, *cellstore, false);
|
||||
Ptr ptr = mWorldModel.getPtr(name, *cellstore);
|
||||
|
||||
if (!ptr.isEmpty())
|
||||
return ptr;
|
||||
|
|
|
@ -294,7 +294,7 @@ MWWorld::CellStore* MWWorld::WorldModel::getCellByPosition(
|
|||
return getInterior(cellNameInSameWorldSpace);
|
||||
}
|
||||
|
||||
MWWorld::Ptr MWWorld::WorldModel::getPtr(const ESM::RefId& name, CellStore& cell, bool searchInContainers)
|
||||
MWWorld::Ptr MWWorld::WorldModel::getPtr(const ESM::RefId& name, CellStore& cell)
|
||||
{
|
||||
if (cell.getState() == CellStore::State_Unloaded)
|
||||
cell.preload();
|
||||
|
@ -314,9 +314,6 @@ MWWorld::Ptr MWWorld::WorldModel::getPtr(const ESM::RefId& name, CellStore& cell
|
|||
if (!ptr.isEmpty() && MWWorld::CellStore::isAccessible(ptr.getRefData(), ptr.getCellRef()))
|
||||
return ptr;
|
||||
|
||||
if (searchInContainers)
|
||||
return cell.searchInContainer(name);
|
||||
|
||||
return Ptr();
|
||||
}
|
||||
|
||||
|
|
|
@ -86,11 +86,7 @@ namespace MWWorld
|
|||
|
||||
Ptr getPtr(const ESM::RefNum& refNum) const;
|
||||
|
||||
Ptr getPtr(const ESM::RefId& name, CellStore& cellStore, bool searchInContainers = false);
|
||||
///< \param searchInContainers Only affect loaded cells.
|
||||
/// @note name must be lower case
|
||||
|
||||
/// @note name must be lower case
|
||||
Ptr getPtr(const ESM::RefId& name, CellStore& cellStore);
|
||||
Ptr getPtr(const ESM::RefId& name);
|
||||
|
||||
template <typename Fn>
|
||||
|
|
Loading…
Reference in a new issue