1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 18:10:37 +00:00

Initialize WorldModel::mIdCache in the class initializer list

This commit is contained in:
elsid 2023-01-09 10:50:30 +01:00
parent efebb8efd8
commit 2f730011dc
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -153,11 +153,11 @@ void MWWorld::WorldModel::writeCell(ESM::ESMWriter& writer, CellStore& cell) con
MWWorld::WorldModel::WorldModel(const MWWorld::ESMStore& store, ESM::ReadersCache& readers)
: mStore(store)
, mReaders(readers)
, mIdCache(std::clamp(Settings::Manager::getInt("pointers cache size", "Cells"), 40, 1000),
{ ESM::RefId::sEmpty, nullptr })
, mIdCacheIndex(0)
, mPtrIndexUpdateCounter(0)
{
int cacheSize = std::clamp(Settings::Manager::getInt("pointers cache size", "Cells"), 40, 1000);
mIdCache = IdCache(cacheSize, std::pair<ESM::RefId, CellStore*>(ESM::RefId(), (CellStore*)nullptr));
}
MWWorld::CellStore* MWWorld::WorldModel::getExterior(int x, int y)