Init structs to make sure that we do not store a random data

macos_ci_fix
Andrei Kortunov 1 year ago
parent 5faf56950b
commit 5d51f3ea26

@ -53,23 +53,20 @@ namespace MWWorld
const ESM::Cell* createEsmCell(ESM::ExteriorCellLocation location, ESMStore& store)
{
ESM::Cell record;
ESM::Cell record = {};
record.mData.mFlags = ESM::Cell::HasWater;
record.mData.mX = location.mX;
record.mData.mY = location.mY;
record.mWater = 0;
record.mMapColor = 0;
record.updateId();
return store.insert(record);
}
const ESM4::Cell* createEsm4Cell(ESM::ExteriorCellLocation location, ESMStore& store)
{
ESM4::Cell record;
ESM4::Cell record = {};
record.mParent = location.mWorldspace;
record.mX = location.mX;
record.mY = location.mY;
record.mCellFlags = 0;
return store.insert(record);
}

@ -169,8 +169,8 @@ namespace ESM4
, currCellGrid(FormId{ 0, 0 })
, cellGridValid(false)
{
subRecordHeader.typeId = 0;
subRecordHeader.dataSize = 0;
recordHeader = {};
subRecordHeader = {};
}
Reader::Reader(Files::IStreamPtr&& esmStream, const std::filesystem::path& filename, VFS::Manager const* vfs,

Loading…
Cancel
Save