diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index 8ec8a9ce3a..6f3d23593b 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -264,9 +264,7 @@ namespace } else if (state.mVersion <= ESM::MaxOldCreatureStatsFormatVersion) { - if constexpr (std::is_same_v) - MWWorld::convertStats(state.mCreatureStats); - else if constexpr (std::is_same_v) + if constexpr (std::is_same_v || std::is_same_v) { MWWorld::convertStats(state.mCreatureStats); MWWorld::convertEnchantmentSlots(state.mCreatureStats, state.mInventory); @@ -274,7 +272,7 @@ namespace } else if (state.mVersion <= ESM::MaxActiveSpellSlotIndexFormatVersion) { - if constexpr (std::is_same_v) + if constexpr (std::is_same_v || std::is_same_v) MWWorld::convertEnchantmentSlots(state.mCreatureStats, state.mInventory); } diff --git a/apps/openmw/mwworld/magiceffects.cpp b/apps/openmw/mwworld/magiceffects.cpp index 728712da01..38f17677ef 100644 --- a/apps/openmw/mwworld/magiceffects.cpp +++ b/apps/openmw/mwworld/magiceffects.cpp @@ -243,7 +243,7 @@ namespace MWWorld continue; if (activeSpell.mFlags & ESM::ActiveSpells::Flag_Equipment) { - auto slotIndex = activeSpell.mItem.mIndex; + std::int64_t slotIndex = activeSpell.mItem.mIndex; auto slot = std::find_if(inventory.mEquipmentSlots.begin(), inventory.mEquipmentSlots.end(), [=](const auto& entry) { return entry.second == slotIndex; }); if (slot != inventory.mEquipmentSlots.end() && slot->first < inventory.mItems.size())