mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 12:39:55 +00:00
Merge branch 'editorclone' into 'master'
Fix some GCC12 warnings See merge request OpenMW/openmw!2854
This commit is contained in:
commit
dce809ea95
@ -269,11 +269,15 @@ namespace CSMWorld
|
||||
copy->mState = RecordBase::State_ModifiedOnly;
|
||||
setRecordId(destination, copy->get());
|
||||
|
||||
if (type == UniversalId::Type_Reference)
|
||||
if constexpr (std::is_same_v<ESXRecordT, CSMWorld::CellRef>)
|
||||
{
|
||||
CSMWorld::CellRef* ptr = (CSMWorld::CellRef*)©->mModified;
|
||||
ptr->mRefNum.mIndex = 0;
|
||||
if (type == UniversalId::Type_Reference)
|
||||
{
|
||||
CSMWorld::CellRef* ptr = (CSMWorld::CellRef*)©->mModified;
|
||||
ptr->mRefNum.mIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const int index = getAppendIndex(destination, type);
|
||||
insertRecord(std::move(copy), getAppendIndex(destination, type));
|
||||
|
||||
|
@ -101,6 +101,7 @@ namespace
|
||||
ESM::GameSetting setting;
|
||||
setting.mId = ESM::RefId::stringRefId("setting");
|
||||
setting.mValue = ESM::Variant(42);
|
||||
setting.mRecordFlags = 0;
|
||||
settings.push_back(setting);
|
||||
EXPECT_EQ(EsmLoader::getGameSetting(settings, "setting"), ESM::Variant(42));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user