mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 12:39:53 +00:00
no more getIdType, only setIdType
This commit is contained in:
parent
e961ac6f7c
commit
31a14952b7
@ -311,9 +311,9 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener, ESM::Dialo
|
||||
}
|
||||
}
|
||||
|
||||
int& ESMStore::getIdType(const std::string& id)
|
||||
void ESMStore::setIdType(const std::string& id, ESM::RecNameInts type)
|
||||
{
|
||||
return mStoreImp->mIds[id];
|
||||
mStoreImp->mIds[id] = type;
|
||||
}
|
||||
|
||||
static std::size_t sTypeIndexCounter = 0;
|
||||
|
@ -165,7 +165,7 @@ namespace MWWorld
|
||||
template<class T>
|
||||
void removeMissingObjects(Store<T>& store);
|
||||
|
||||
int& getIdType(const std::string& id);
|
||||
void setIdType(const std::string& id, ESM::RecNameInts type);
|
||||
|
||||
using LuaContent = std::variant<
|
||||
ESM::LuaScriptsCfg, // data from an omwaddon
|
||||
@ -227,7 +227,7 @@ namespace MWWorld
|
||||
T *ptr = store.insert(record);
|
||||
if constexpr (std::is_convertible_v<Store<T>*, DynamicStore*>)
|
||||
{
|
||||
getIdType(ptr->mId) = T::sRecordId;
|
||||
setIdType(ptr->mId, T::sRecordId);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
@ -240,7 +240,7 @@ namespace MWWorld
|
||||
T *ptr = store.insert(x);
|
||||
if constexpr (std::is_convertible_v<Store<T>*, DynamicStore*>)
|
||||
{
|
||||
getIdType(ptr->mId) = T::sRecordId;
|
||||
setIdType(ptr->mId, T::sRecordId);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
@ -258,7 +258,7 @@ namespace MWWorld
|
||||
T *ptr = store.insertStatic(x);
|
||||
if constexpr (std::is_convertible_v<Store<T>*, DynamicStore*>)
|
||||
{
|
||||
getIdType(ptr->mId) = T::sRecordId;
|
||||
setIdType(ptr->mId, T::sRecordId);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user