From be26fbdacb57449ceb87b09b0c1593a65a88428a Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Thu, 18 May 2023 20:21:47 +0200 Subject: [PATCH] Explicitly intialize the fields in `ESM4::Cell` that don't have default constructors. --- components/esm4/loadcell.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esm4/loadcell.hpp b/components/esm4/loadcell.hpp index 5fd32a598d..d8001643e6 100644 --- a/components/esm4/loadcell.hpp +++ b/components/esm4/loadcell.hpp @@ -64,22 +64,22 @@ namespace ESM4 { FormId mFormId; // from the header ESM::RefId mId; - std::uint32_t mFlags; // from the header, see enum type RecordFlag for details + std::uint32_t mFlags = 0; // from the header, see enum type RecordFlag for details ESM::RefId mParent; // world formId (for grouping cells), from the loading sequence std::string mEditorId; std::string mFullName; - std::uint16_t mCellFlags; // TES5 can also be 8 bits + std::uint16_t mCellFlags = 0; // TES5 can also be 8 bits - std::int32_t mX; - std::int32_t mY; + std::int32_t mX = 0; + std::int32_t mY = 0; FormId mOwner; FormId mGlobal; FormId mClimate; FormId mWater; - float mWaterHeight; + float mWaterHeight = 0; std::vector mRegions; Lighting mLighting; @@ -91,9 +91,9 @@ namespace ESM4 FormId mAcousticSpace; // FO3/FONV // TES4: 0 = default, 1 = public, 2 = dungeon // FO3/FONV have more types (not sure how they are used, however) - std::uint8_t mMusicType; + std::uint8_t mMusicType = 0; - CellGroup* mCellGroup; + CellGroup* mCellGroup = nullptr; ESM4::ReaderContext mReaderContext;