diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index 6c473edf36..0182b103d5 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -127,13 +127,15 @@ namespace } } - template - struct StoreIndexToRecordType { - - typedef void recordType; - }; + } +template +struct StoreIndexToRecordType { + + typedef void recordType; +}; + static int sRecordTypeCounter = 0; #define OPENMW_ESM_ADD_STORE_TYPE(__Type, __ID_NUM) template<> const int MWWorld::SRecordType<__Type>::sStoreIndex = sRecordTypeCounter ++; \ @@ -368,7 +370,7 @@ namespace MWWorld assert(sRecordTypeCounter == sRecordIndexCount); //Otherwise something wen wrong with assigning index to stores constexpr_for<0, sRecordIndexCount,1> ([this](auto storeIndex) { - ESMStoreImp::createStore::recordType>(*this); + ESMStoreImp::createStore::recordType>(*this); }); mStoreImp = std::make_unique(*this);