mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 12:39:53 +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;
|
copy->mState = RecordBase::State_ModifiedOnly;
|
||||||
setRecordId(destination, copy->get());
|
setRecordId(destination, copy->get());
|
||||||
|
|
||||||
|
if constexpr (std::is_same_v<ESXRecordT, CSMWorld::CellRef>)
|
||||||
|
{
|
||||||
if (type == UniversalId::Type_Reference)
|
if (type == UniversalId::Type_Reference)
|
||||||
{
|
{
|
||||||
CSMWorld::CellRef* ptr = (CSMWorld::CellRef*)©->mModified;
|
CSMWorld::CellRef* ptr = (CSMWorld::CellRef*)©->mModified;
|
||||||
ptr->mRefNum.mIndex = 0;
|
ptr->mRefNum.mIndex = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const int index = getAppendIndex(destination, type);
|
const int index = getAppendIndex(destination, type);
|
||||||
insertRecord(std::move(copy), getAppendIndex(destination, type));
|
insertRecord(std::move(copy), getAppendIndex(destination, type));
|
||||||
|
|
||||||
|
@ -101,6 +101,7 @@ namespace
|
|||||||
ESM::GameSetting setting;
|
ESM::GameSetting setting;
|
||||||
setting.mId = ESM::RefId::stringRefId("setting");
|
setting.mId = ESM::RefId::stringRefId("setting");
|
||||||
setting.mValue = ESM::Variant(42);
|
setting.mValue = ESM::Variant(42);
|
||||||
|
setting.mRecordFlags = 0;
|
||||||
settings.push_back(setting);
|
settings.push_back(setting);
|
||||||
EXPECT_EQ(EsmLoader::getGameSetting(settings, "setting"), ESM::Variant(42));
|
EXPECT_EQ(EsmLoader::getGameSetting(settings, "setting"), ESM::Variant(42));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user