mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
revert some changes
This commit is contained in:
parent
64a45f8aeb
commit
5209685783
@ -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…
x
Reference in New Issue
Block a user