From 0d7bd19119958ac4640eafdb4e9ffdbeb145c9fb Mon Sep 17 00:00:00 2001 From: "florent.teppe" Date: Fri, 2 Sep 2022 23:36:41 +0200 Subject: [PATCH] removes recname type, we use what is already included in ESM types --- apps/openmw/mwworld/esmstore.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index 2a85ef8107..a9301033df 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -136,17 +136,10 @@ struct StoreIndexToRecordType { typedef void recordType; }; -template -struct RecordTypeToRecName -{ - static const ESM::RecNameInts sRecName; -}; - static int sRecordTypeCounter = 0; #define OPENMW_ESM_ADD_STORE_TYPE(__Type, __REC_NAME,__ID_NUM) template<> const int MWWorld::SRecordType<__Type>::sStoreIndex = sRecordTypeCounter ++; \ template<> struct StoreIndexToRecordType<__ID_NUM > {typedef __Type recordType;}; \ -template<> const ESM::RecNameInts RecordTypeToRecName<__Type>::sRecName = __REC_NAME OPENMW_ESM_ADD_STORE_TYPE(ESM::Activator,ESM::REC_ACTI,0); OPENMW_ESM_ADD_STORE_TYPE(ESM::Potion,ESM::REC_ALCH,1); @@ -302,7 +295,7 @@ namespace MWWorld { int storeIndex = SRecordType::sStoreIndex; stores.mStores[storeIndex] = std::make_unique>(); - constexpr ESM::RecNameInts recName = RecordTypeToRecName::sRecName; + constexpr ESM::RecNameInts recName = T::sRecordId; if constexpr (recName != ESM::REC_INTERNAL_PLAYER) { stores.mStoreImp->mEsm3RecordToStore[recName] = stores.mStores[storeIndex].get();