mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-06 01:13:07 +00:00
revert some changes
This commit is contained in:
parent
64a45f8aeb
commit
5209685783
2 changed files with 9 additions and 7 deletions
|
|
@ -738,9 +738,9 @@ namespace MWWorld
|
|||
case ESM::REC_LEVI:
|
||||
case ESM::REC_LEVC:
|
||||
case ESM::REC_LIGH:
|
||||
case ESM::REC_NPC_:
|
||||
mStoreImp->mRecNameToStore[type]->read(reader);
|
||||
return true;
|
||||
case ESM::REC_NPC_:
|
||||
case ESM::REC_CREA:
|
||||
case ESM::REC_CONT:
|
||||
mStoreImp->mRecNameToStore[type]->read(reader, true);
|
||||
|
|
|
|||
|
|
@ -269,13 +269,15 @@ namespace MWWorld
|
|||
list.push_back((*it)->mId);
|
||||
}
|
||||
}
|
||||
template <typename T, typename Id>
|
||||
T* TypedDynamicStore<T, Id>::insert(const T& item, bool /*overrideOnly*/)
|
||||
template <class T, class Id>
|
||||
T* TypedDynamicStore<T, Id>::insert(const T& item, bool overrideOnly)
|
||||
{
|
||||
// Check if the ID already exists in static or dynamic stores
|
||||
auto itStatic = mStatic.find(item.mId);
|
||||
auto itDynamic = mDynamic.find(item.mId);
|
||||
|
||||
if (overrideOnly)
|
||||
{
|
||||
auto it = mStatic.find(item.mId);
|
||||
if (it == mStatic.end())
|
||||
return nullptr;
|
||||
}
|
||||
std::pair<typename Dynamic::iterator, bool> result = mDynamic.insert_or_assign(item.mId, item);
|
||||
T* ptr = &result.first->second;
|
||||
if (result.second)
|
||||
|
|
|
|||
Loading…
Reference in a new issue