Use ESM::RefId as key for Data::mRefLoadCache

depth-refraction
elsid 2 years ago
parent 419a86f0b9
commit 693f4c40f4
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -1209,9 +1209,8 @@ bool CSMWorld::Data::continueLoading(CSMDoc::Messages& messages)
messages.add(id, "Logic error: cell index out of bounds", "", CSMDoc::Message::Severity_Error);
index = mCells.getSize() - 1;
}
const std::string cellId = mCells.getId(index).getRefIdString();
mRefs.load(*mReader, index, mBase, mRefLoadCache[cellId], messages);
mRefs.load(*mReader, index, mBase, mRefLoadCache[mCells.getId(index)], messages);
break;
}

@ -123,7 +123,7 @@ namespace CSMWorld
const ESM::Dialogue* mDialogue; // last loaded dialogue
bool mBase;
bool mProject;
std::map<std::string, std::map<unsigned int, unsigned int>, Misc::StringUtils::CiComp> mRefLoadCache;
std::map<ESM::RefId, std::map<unsigned int, unsigned int>> mRefLoadCache;
int mReaderIndex;
bool mFsStrict;

Loading…
Cancel
Save