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:
parent
efebb8efd8
commit
2f730011dc
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue