1
0
Fork 0
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:
Petr Mikheev 2023-02-19 12:47:33 +01:00
parent 47b7c71c73
commit 1c2f24d1ca
3 changed files with 3 additions and 10 deletions

View file

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

View file

@ -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();
}

View file

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