mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-26 23:36:48 +00:00
Merge branch 'editorclone' into 'master'
Fix some GCC12 warnings See merge request OpenMW/openmw!2854
This commit is contained in:
commit
dce809ea95
2 changed files with 8 additions and 3 deletions
|
@ -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…
Reference in a new issue