From f516e34688b08b4d18874884f2a9ffdea65d1c4d Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 19 Feb 2022 01:54:34 +0100 Subject: [PATCH] Remove used-defined constructors from ESM4 types To avoid explicit initialization. It should happen in the load functions anyway. * Move all non-zero initializations to corresponding class definition. * Replace std::vector by std::array when it has constant size. --- components/esm4/acti.hpp | 1 - components/esm4/lighting.hpp | 3 ++- components/esm4/loadachr.cpp | 10 ---------- components/esm4/loadachr.hpp | 3 +-- components/esm4/loadacre.cpp | 9 --------- components/esm4/loadacre.hpp | 3 +-- components/esm4/loadacti.cpp | 10 ---------- components/esm4/loadalch.cpp | 13 ------------- components/esm4/loadaloc.cpp | 9 --------- components/esm4/loadammo.cpp | 10 ---------- components/esm4/loadammo.hpp | 1 - components/esm4/loadanio.cpp | 7 ------- components/esm4/loadanio.hpp | 1 - components/esm4/loadappa.cpp | 14 -------------- components/esm4/loadappa.hpp | 1 - components/esm4/loadarma.cpp | 9 --------- components/esm4/loadarma.hpp | 1 - components/esm4/loadarmo.cpp | 22 ---------------------- components/esm4/loadarmo.hpp | 1 - components/esm4/loadaspc.cpp | 6 ------ components/esm4/loadaspc.hpp | 1 - components/esm4/loadbook.cpp | 16 ---------------- components/esm4/loadbook.hpp | 1 - components/esm4/loadbptd.cpp | 7 ------- components/esm4/loadbptd.hpp | 1 - components/esm4/loadcell.cpp | 22 ---------------------- components/esm4/loadcell.hpp | 1 - components/esm4/loadclas.cpp | 8 -------- components/esm4/loadclas.hpp | 1 - components/esm4/loadclfm.cpp | 11 ----------- components/esm4/loadclfm.hpp | 1 - components/esm4/loadclot.cpp | 16 ---------------- components/esm4/loadclot.hpp | 1 - components/esm4/loadcont.cpp | 8 -------- components/esm4/loadcont.hpp | 1 - components/esm4/loadcrea.cpp | 22 ---------------------- components/esm4/loadcrea.hpp | 1 - components/esm4/loaddial.cpp | 9 --------- components/esm4/loaddial.hpp | 1 - components/esm4/loaddobj.cpp | 7 ------- components/esm4/loaddobj.hpp | 1 - components/esm4/loaddoor.cpp | 8 -------- components/esm4/loaddoor.hpp | 1 - components/esm4/loadeyes.cpp | 9 --------- components/esm4/loadeyes.hpp | 1 - components/esm4/loadflor.cpp | 8 -------- components/esm4/loadflor.hpp | 1 - components/esm4/loadflst.cpp | 5 ----- components/esm4/loadflst.hpp | 1 - components/esm4/loadfurn.cpp | 8 -------- components/esm4/loadfurn.hpp | 1 - components/esm4/loadglob.cpp | 5 ----- components/esm4/loadglob.hpp | 1 - components/esm4/loadgras.cpp | 6 ------ components/esm4/loadgras.hpp | 1 - components/esm4/loadhair.cpp | 10 ---------- components/esm4/loadhair.hpp | 1 - components/esm4/loadhdpt.cpp | 9 --------- components/esm4/loadhdpt.hpp | 4 ++-- components/esm4/loadidle.cpp | 7 ------- components/esm4/loadidle.hpp | 1 - components/esm4/loadidlm.cpp | 5 ----- components/esm4/loadidlm.hpp | 1 - components/esm4/loadimod.cpp | 5 ----- components/esm4/loadimod.hpp | 1 - components/esm4/loadinfo.cpp | 15 --------------- components/esm4/loadinfo.hpp | 1 - components/esm4/loadingr.cpp | 15 --------------- components/esm4/loadingr.hpp | 1 - components/esm4/loadkeym.cpp | 12 ------------ components/esm4/loadkeym.hpp | 1 - components/esm4/loadland.cpp | 11 ----------- components/esm4/loadland.hpp | 1 - components/esm4/loadlgtm.cpp | 16 ---------------- components/esm4/loadlgtm.hpp | 1 - components/esm4/loadligh.cpp | 9 --------- components/esm4/loadligh.hpp | 11 +++-------- components/esm4/loadltex.cpp | 8 -------- components/esm4/loadltex.hpp | 1 - components/esm4/loadlvlc.cpp | 6 ------ components/esm4/loadlvlc.hpp | 1 - components/esm4/loadlvli.cpp | 6 ------ components/esm4/loadlvli.hpp | 1 - components/esm4/loadlvln.cpp | 6 ------ components/esm4/loadlvln.hpp | 1 - components/esm4/loadmato.cpp | 6 ------ components/esm4/loadmato.hpp | 1 - components/esm4/loadmisc.cpp | 12 ------------ components/esm4/loadmisc.hpp | 1 - components/esm4/loadmset.cpp | 18 ------------------ components/esm4/loadmset.hpp | 3 +-- components/esm4/loadmstt.cpp | 6 ------ components/esm4/loadmusc.cpp | 6 ------ components/esm4/loadmusc.hpp | 1 - components/esm4/loadnavi.cpp | 5 ----- components/esm4/loadnavi.hpp | 1 - components/esm4/loadnavm.cpp | 4 ---- components/esm4/loadnavm.hpp | 1 - components/esm4/loadnote.cpp | 8 -------- components/esm4/loadnote.hpp | 1 - components/esm4/loadnpc.cpp | 21 --------------------- components/esm4/loadnpc.hpp | 1 - components/esm4/loadotft.cpp | 5 ----- components/esm4/loadotft.hpp | 1 - components/esm4/loadpack.cpp | 14 -------------- components/esm4/loadpack.hpp | 4 ++-- components/esm4/loadpgrd.cpp | 10 ---------- components/esm4/loadpgre.cpp | 5 ----- components/esm4/loadpwat.cpp | 5 ----- components/esm4/loadrace.cpp | 22 ---------------------- components/esm4/loadrace.hpp | 14 +++++++------- components/esm4/loadrefr.cpp | 23 ----------------------- components/esm4/loadrefr.hpp | 7 +++---- components/esm4/loadregn.cpp | 7 ------- components/esm4/loadregn.hpp | 1 - components/esm4/loadroad.cpp | 8 -------- components/esm4/loadroad.hpp | 1 - components/esm4/loadsbsp.cpp | 9 --------- components/esm4/loadsbsp.hpp | 1 - components/esm4/loadscol.cpp | 5 ----- components/esm4/loadscol.hpp | 1 - components/esm4/loadscpt.cpp | 5 ----- components/esm4/loadscpt.hpp | 1 - components/esm4/loadscrl.cpp | 11 ----------- components/esm4/loadscrl.hpp | 1 - components/esm4/loadsgst.cpp | 14 -------------- components/esm4/loadsgst.hpp | 1 - components/esm4/loadslgm.cpp | 11 ----------- components/esm4/loadslgm.hpp | 1 - components/esm4/loadsndr.cpp | 6 ------ components/esm4/loadsndr.hpp | 1 - components/esm4/loadsoun.cpp | 6 ------ components/esm4/loadsoun.hpp | 1 - components/esm4/loadstat.cpp | 6 ------ components/esm4/loadstat.hpp | 1 - components/esm4/loadtact.cpp | 8 -------- components/esm4/loadtact.hpp | 1 - components/esm4/loadterm.cpp | 10 ---------- components/esm4/loadterm.hpp | 1 - components/esm4/loadtree.cpp | 7 ------- components/esm4/loadtree.hpp | 1 - components/esm4/loadtxst.cpp | 13 ------------- components/esm4/loadtxst.hpp | 1 - components/esm4/loadweap.cpp | 11 ----------- components/esm4/loadweap.hpp | 1 - components/esm4/loadwrld.cpp | 19 ------------------- components/esm4/loadwrld.hpp | 1 - 147 files changed, 22 insertions(+), 852 deletions(-) diff --git a/components/esm4/acti.hpp b/components/esm4/acti.hpp index 4ec3fe1e5e..f86a4aa370 100644 --- a/components/esm4/acti.hpp +++ b/components/esm4/acti.hpp @@ -57,7 +57,6 @@ namespace ESM4 std::string mActivationPrompt; - Activator(); virtual ~Activator(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/lighting.hpp b/components/esm4/lighting.hpp index 42e76eceee..a139ae630e 100644 --- a/components/esm4/lighting.hpp +++ b/components/esm4/lighting.hpp @@ -28,6 +28,7 @@ #define ESM4_LIGHTING_H #include +#include namespace ESM4 { @@ -44,7 +45,7 @@ namespace ESM4 std::int32_t rotationZ; // rotation z | 00 00 00 00 = 0 float fogDirFade; // Fog dir fade | 00 00 80 3F = 1.f float fogClipDist; // Fog clip dist | 00 80 3B 45 = 3000.f - float fogPower; + float fogPower = std::numeric_limits::max(); }; struct Lighting_TES5 diff --git a/components/esm4/loadachr.cpp b/components/esm4/loadachr.cpp index fe03fcb59e..e006588475 100644 --- a/components/esm4/loadachr.cpp +++ b/components/esm4/loadachr.cpp @@ -32,16 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::ActorCharacter::ActorCharacter() : mFormId(0), mFlags(0), mBaseObj(0), - mScale(1.f), mOwner(0), mGlobal(0), mInitiallyDisabled(false) -{ - mEditorId.clear(); - mFullName.clear(); - - mEsp.parent = 0; - mEsp.flags = 0; -} - ESM4::ActorCharacter::~ActorCharacter() { } diff --git a/components/esm4/loadachr.hpp b/components/esm4/loadachr.hpp index a8656ea926..7f78aa32d1 100644 --- a/components/esm4/loadachr.hpp +++ b/components/esm4/loadachr.hpp @@ -49,7 +49,7 @@ namespace ESM4 FormId mBaseObj; Placement mPlacement; - float mScale; // default 1.f + float mScale = 1.0f; FormId mOwner; FormId mGlobal; @@ -57,7 +57,6 @@ namespace ESM4 EnableParent mEsp; - ActorCharacter(); virtual ~ActorCharacter(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadacre.cpp b/components/esm4/loadacre.cpp index 3510986d3c..9eb0cc7e5f 100644 --- a/components/esm4/loadacre.cpp +++ b/components/esm4/loadacre.cpp @@ -32,15 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::ActorCreature::ActorCreature() : mFormId(0), mFlags(0), mBaseObj(0), mScale(1.f), - mOwner(0), mGlobal(0), mFactionRank(0), mInitiallyDisabled(false) -{ - mEditorId.clear(); - - mEsp.parent = 0; - mEsp.flags = 0; -} - ESM4::ActorCreature::~ActorCreature() { } diff --git a/components/esm4/loadacre.hpp b/components/esm4/loadacre.hpp index 26cab34a4e..0b436d762b 100644 --- a/components/esm4/loadacre.hpp +++ b/components/esm4/loadacre.hpp @@ -45,7 +45,7 @@ namespace ESM4 FormId mBaseObj; Placement mPlacement; - float mScale; // default 1.f + float mScale = 1.0f; FormId mOwner; FormId mGlobal; std::uint32_t mFactionRank; @@ -54,7 +54,6 @@ namespace ESM4 EnableParent mEsp; - ActorCreature(); virtual ~ActorCreature(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadacti.cpp b/components/esm4/loadacti.cpp index abbe901014..cdfd6972fc 100644 --- a/components/esm4/loadacti.cpp +++ b/components/esm4/loadacti.cpp @@ -32,16 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Activator::Activator() : mFormId(0), mFlags(0), mScriptId(0), mLoopingSound(0), mActivationSound(0), - mBoundRadius(0.f), mRadioTemplate(0), mRadioStation(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - - mActivationPrompt.clear(); -} - ESM4::Activator::~Activator() { } diff --git a/components/esm4/loadalch.cpp b/components/esm4/loadalch.cpp index b720b740ca..2c346d71b9 100644 --- a/components/esm4/loadalch.cpp +++ b/components/esm4/loadalch.cpp @@ -33,19 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Potion::Potion() : mFormId(0), mFlags(0), mPickUpSound(0), mDropSound(0), mScriptId(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - mMiniIcon.clear(); - - mData.weight = 0.f; - - std::memset(&mEffect, 0, sizeof(ScriptEffect)); -} - ESM4::Potion::~Potion() { } diff --git a/components/esm4/loadaloc.cpp b/components/esm4/loadaloc.cpp index a84e56592d..9907e5908b 100644 --- a/components/esm4/loadaloc.cpp +++ b/components/esm4/loadaloc.cpp @@ -38,15 +38,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::MediaLocationController::MediaLocationController() : mFormId(0), mFlags(0), - mConditionalFaction(0), mLocationDelay(0.f), mRetriggerDelay(0.f), mDayStart(0), mNightStart(0) -{ - mEditorId.clear(); - mFullName.clear(); - - std::memset(&mMediaFlags, 0, sizeof(MLC_Flags)); -} - ESM4::MediaLocationController::~MediaLocationController() { } diff --git a/components/esm4/loadammo.cpp b/components/esm4/loadammo.cpp index 7ccf8e1582..3c30a7a73b 100644 --- a/components/esm4/loadammo.cpp +++ b/components/esm4/loadammo.cpp @@ -31,16 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Ammunition::Ammunition() : mFormId(0), mFlags(0), mPickUpSound(0), mDropSound(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mText.clear(); - mIcon.clear(); - mMiniIcon.clear(); -} - ESM4::Ammunition::~Ammunition() { } diff --git a/components/esm4/loadammo.hpp b/components/esm4/loadammo.hpp index 8ff9cd9390..c31d38c10c 100644 --- a/components/esm4/loadammo.hpp +++ b/components/esm4/loadammo.hpp @@ -71,7 +71,6 @@ namespace ESM4 Data mData; - Ammunition(); virtual ~Ammunition(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadanio.cpp b/components/esm4/loadanio.cpp index b6b97a1a47..15847fbbda 100644 --- a/components/esm4/loadanio.cpp +++ b/components/esm4/loadanio.cpp @@ -31,13 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::AnimObject::AnimObject() : mFormId(0), mFlags(0), mBoundRadius(0.f), mIdleAnim(0) -{ - mEditorId.clear(); - mModel.clear(); - mUnloadEvent.clear(); -} - ESM4::AnimObject::~AnimObject() { } diff --git a/components/esm4/loadanio.hpp b/components/esm4/loadanio.hpp index 4259abe7b3..f7e85f613b 100644 --- a/components/esm4/loadanio.hpp +++ b/components/esm4/loadanio.hpp @@ -50,7 +50,6 @@ namespace ESM4 FormId mIdleAnim; // only in TES4 std::string mUnloadEvent; // only in TES5 - AnimObject(); virtual ~AnimObject(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadappa.cpp b/components/esm4/loadappa.cpp index 7ad7635927..c0561322b0 100644 --- a/components/esm4/loadappa.cpp +++ b/components/esm4/loadappa.cpp @@ -31,20 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Apparatus::Apparatus() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mText.clear(); - mIcon.clear(); - - mData.type = 0; - mData.value = 0; - mData.weight = 0.f; - mData.quality = 0.f; -} - ESM4::Apparatus::~Apparatus() { } diff --git a/components/esm4/loadappa.hpp b/components/esm4/loadappa.hpp index 1723c969ee..f3b2966518 100644 --- a/components/esm4/loadappa.hpp +++ b/components/esm4/loadappa.hpp @@ -62,7 +62,6 @@ namespace ESM4 Data mData; - Apparatus(); virtual ~Apparatus(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadarma.cpp b/components/esm4/loadarma.cpp index 8b29000bb3..6306845689 100644 --- a/components/esm4/loadarma.cpp +++ b/components/esm4/loadarma.cpp @@ -32,15 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::ArmorAddon::ArmorAddon() : mFormId(0), mFlags(0), mTextureMale(0), mTextureFemale(0), - mRacePrimary(0) -{ - mEditorId.clear(); - - mModelMale.clear(); - mModelFemale.clear(); -} - ESM4::ArmorAddon::~ArmorAddon() { } diff --git a/components/esm4/loadarma.hpp b/components/esm4/loadarma.hpp index 59c4550b7f..f7abb404a1 100644 --- a/components/esm4/loadarma.hpp +++ b/components/esm4/loadarma.hpp @@ -57,7 +57,6 @@ namespace ESM4 BodyTemplate mBodyTemplate; // TES5 - ArmorAddon(); virtual ~ArmorAddon(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadarmo.cpp b/components/esm4/loadarmo.cpp index bc0765c869..c6237f326d 100644 --- a/components/esm4/loadarmo.cpp +++ b/components/esm4/loadarmo.cpp @@ -32,28 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Armor::Armor() : mFormId(0), mFlags(0), mIsTES4(false), mIsFO3(false), mIsFONV(false), - mPickUpSound(0), mDropSound(0), mBoundRadius(0.f), - mArmorFlags(0), mGeneralFlags(0), mScriptId(0), mEnchantmentPoints(0), mEnchantment(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModelMale.clear(); - mModelMaleWorld.clear(); - mModelFemale.clear(); - mModelFemaleWorld.clear(); - mText.clear(); - mIconMale.clear(); - mMiniIconMale.clear(); - mIconFemale.clear(); - mMiniIconFemale.clear(); - - mData.armor = 0; - mData.value = 0; - mData.health = 0; - mData.weight = 0.f; -} - ESM4::Armor::~Armor() { } diff --git a/components/esm4/loadarmo.hpp b/components/esm4/loadarmo.hpp index f17521f507..b44ba1a973 100644 --- a/components/esm4/loadarmo.hpp +++ b/components/esm4/loadarmo.hpp @@ -183,7 +183,6 @@ namespace ESM4 std::vector mAddOns; // TES5 ARMA Data mData; - Armor(); virtual ~Armor(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadaspc.cpp b/components/esm4/loadaspc.cpp index a4cb6f3939..8fb9d70c71 100644 --- a/components/esm4/loadaspc.cpp +++ b/components/esm4/loadaspc.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::AcousticSpace::AcousticSpace() : mFormId(0), mFlags(0), mEnvironmentType(0), mSoundRegion(0), - mIsInterior(0) -{ - mEditorId.clear(); -} - ESM4::AcousticSpace::~AcousticSpace() { } diff --git a/components/esm4/loadaspc.hpp b/components/esm4/loadaspc.hpp index 3ab1a8484d..179297a604 100644 --- a/components/esm4/loadaspc.hpp +++ b/components/esm4/loadaspc.hpp @@ -53,7 +53,6 @@ namespace ESM4 std::uint32_t mIsInterior; // if true only use mAmbientLoopSounds[0] - AcousticSpace(); virtual ~AcousticSpace(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadbook.cpp b/components/esm4/loadbook.cpp index 0ffc69ef0e..939888fc43 100644 --- a/components/esm4/loadbook.cpp +++ b/components/esm4/loadbook.cpp @@ -31,22 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Book::Book() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0), - mEnchantmentPoints(0), mEnchantment(0), mPickUpSound(0), mDropSound(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mText.clear(); - mIcon.clear(); - - mData.flags = 0; - mData.type = 0; - mData.bookSkill = 0; - mData.value = 0; - mData.weight = 0.f; -} - ESM4::Book::~Book() { } diff --git a/components/esm4/loadbook.hpp b/components/esm4/loadbook.hpp index c5c1a3529f..9cb5358bdb 100644 --- a/components/esm4/loadbook.hpp +++ b/components/esm4/loadbook.hpp @@ -101,7 +101,6 @@ namespace ESM4 FormId mPickUpSound; FormId mDropSound; - Book(); virtual ~Book(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadbptd.cpp b/components/esm4/loadbptd.cpp index 6c6c1bc26c..a65d2dd482 100644 --- a/components/esm4/loadbptd.cpp +++ b/components/esm4/loadbptd.cpp @@ -43,13 +43,6 @@ void ESM4::BodyPartData::BodyPart::clear() mGoreEffectsTarget.clear(); } -ESM4::BodyPartData::BodyPartData() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::BodyPartData::~BodyPartData() { } diff --git a/components/esm4/loadbptd.hpp b/components/esm4/loadbptd.hpp index 0a29cd22cb..0b971ca083 100644 --- a/components/esm4/loadbptd.hpp +++ b/components/esm4/loadbptd.hpp @@ -115,7 +115,6 @@ namespace ESM4 std::vector mBodyParts; - BodyPartData(); virtual ~BodyPartData(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadcell.cpp b/components/esm4/loadcell.cpp index eb1f864b92..0b90a7cdbf 100644 --- a/components/esm4/loadcell.cpp +++ b/components/esm4/loadcell.cpp @@ -39,28 +39,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Cell::Cell() : mParent(0), mFormId(0), mFlags(0), mCellFlags(0), mX(0), mY(0), mOwner(0), - mGlobal(0), mClimate(0), mWater(0), mWaterHeight(0.f), - mLightingTemplate(0), mLightingTemplateFlags(0), mMusic(0), mAcousticSpace(0), - mMusicType(0), mPreloaded(false) -{ - mEditorId.clear(); - mFullName.clear(); - - mLighting.ambient = 0; - mLighting.directional = 0; - mLighting.fogColor = 0; - mLighting.fogNear = 0.f; - mLighting.fogFar = 0.f; - mLighting.rotationXY = 0; - mLighting.rotationZ = 0; - mLighting.fogDirFade = 0.f; - mLighting.fogClipDist = 0.f; - mLighting.fogPower = FLT_MAX; // hack way to detect TES4 - - mRegions.clear(); -} - ESM4::Cell::~Cell() { } diff --git a/components/esm4/loadcell.hpp b/components/esm4/loadcell.hpp index 70dc94e73a..c2274fcbe9 100644 --- a/components/esm4/loadcell.hpp +++ b/components/esm4/loadcell.hpp @@ -91,7 +91,6 @@ namespace ESM4 CellGroup *mCellGroup; - Cell(); virtual ~Cell(); void init(ESM4::Reader& reader); // common setup for both preload() and load() diff --git a/components/esm4/loadclas.cpp b/components/esm4/loadclas.cpp index 2948976709..80c9fc2b0f 100644 --- a/components/esm4/loadclas.cpp +++ b/components/esm4/loadclas.cpp @@ -36,14 +36,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Class::Class() -{ - mEditorId.clear(); - mFullName.clear(); - mDesc.clear(); - mIcon.clear(); -} - ESM4::Class::~Class() { } diff --git a/components/esm4/loadclas.hpp b/components/esm4/loadclas.hpp index 83e8372f4a..c68a1c1ae5 100644 --- a/components/esm4/loadclas.hpp +++ b/components/esm4/loadclas.hpp @@ -53,7 +53,6 @@ namespace ESM4 std::string mIcon; Data mData; - Class(); ~Class(); void load(ESM4::Reader& reader); diff --git a/components/esm4/loadclfm.cpp b/components/esm4/loadclfm.cpp index b926cb93fd..7ad9f56615 100644 --- a/components/esm4/loadclfm.cpp +++ b/components/esm4/loadclfm.cpp @@ -32,17 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Colour::Colour() : mFormId(0), mFlags(0), mPlayable(0) -{ - mEditorId.clear(); - mFullName.clear(); - - mColour.red = 0; - mColour.green = 0; - mColour.blue = 0; - mColour.custom = 0; -} - ESM4::Colour::~Colour() { } diff --git a/components/esm4/loadclfm.hpp b/components/esm4/loadclfm.hpp index 2a18e42cd6..35d4a28686 100644 --- a/components/esm4/loadclfm.hpp +++ b/components/esm4/loadclfm.hpp @@ -57,7 +57,6 @@ namespace ESM4 ColourRGB mColour; std::uint32_t mPlayable; - Colour(); virtual ~Colour(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadclot.cpp b/components/esm4/loadclot.cpp index da6473c393..8f43cf2ac6 100644 --- a/components/esm4/loadclot.cpp +++ b/components/esm4/loadclot.cpp @@ -32,22 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Clothing::Clothing() : mFormId(0), mFlags(0), mBoundRadius(0.f), mClothingFlags(0), - mScriptId(0), mEnchantmentPoints(0), mEnchantment(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModelMale.clear(); - mModelMaleWorld.clear(); - mModelFemale.clear(); - mModelFemaleWorld.clear(); - mIconMale.clear(); - mIconFemale.clear(); - - mData.value = 0; - mData.weight = 0.f; -} - ESM4::Clothing::~Clothing() { } diff --git a/components/esm4/loadclot.hpp b/components/esm4/loadclot.hpp index 06e019137b..8870c58a45 100644 --- a/components/esm4/loadclot.hpp +++ b/components/esm4/loadclot.hpp @@ -70,7 +70,6 @@ namespace ESM4 Data mData; - Clothing(); virtual ~Clothing(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadcont.cpp b/components/esm4/loadcont.cpp index 06366c88cc..6ddb6c17f9 100644 --- a/components/esm4/loadcont.cpp +++ b/components/esm4/loadcont.cpp @@ -31,14 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Container::Container() : mFormId(0), mFlags(0), mBoundRadius(0.f), mDataFlags(0), mWeight(0.f), - mOpenSound(0), mCloseSound(0), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::Container::~Container() { } diff --git a/components/esm4/loadcont.hpp b/components/esm4/loadcont.hpp index e059d9a361..7218da9729 100644 --- a/components/esm4/loadcont.hpp +++ b/components/esm4/loadcont.hpp @@ -58,7 +58,6 @@ namespace ESM4 std::vector mInventory; - Container(); virtual ~Container(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadcrea.cpp b/components/esm4/loadcrea.cpp index 5fdd414256..a78aadd82d 100644 --- a/components/esm4/loadcrea.cpp +++ b/components/esm4/loadcrea.cpp @@ -40,28 +40,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Creature::Creature() : mFormId(0), mFlags(0), mDeathItem(0), mScriptId(0), mCombatStyle(0), - mSoundBase(0), mSound(0), mSoundChance(0), mBaseScale(0.f), - mTurningSpeed(0.f), mFootWeight(0.f), mBoundRadius(0.f) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - - mBloodSpray.clear(); - mBloodDecal.clear(); - - mAIData.aggression = 0; - mAIData.confidence = 0; - mAIData.energyLevel = 0; - mAIData.responsibility = 0; - mAIData.aiFlags = 0; - mAIData.trainSkill = 0; - mAIData.trainLevel = 0; - - std::memset(&mData, 0, sizeof(Data)); -} - ESM4::Creature::~Creature() { } diff --git a/components/esm4/loadcrea.hpp b/components/esm4/loadcrea.hpp index c2889d1713..8062a670d0 100644 --- a/components/esm4/loadcrea.hpp +++ b/components/esm4/loadcrea.hpp @@ -138,7 +138,6 @@ namespace ESM4 FormId mBaseTemplate; // FO3/FONV std::vector mBodyParts; // FO3/FONV - Creature(); virtual ~Creature(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loaddial.cpp b/components/esm4/loaddial.cpp index 716da441d5..28176e7c52 100644 --- a/components/esm4/loaddial.cpp +++ b/components/esm4/loaddial.cpp @@ -33,15 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Dialogue::Dialogue() : mFormId(0), mFlags(0), mDoAllBeforeRepeat(false), - mDialType(0), mDialFlags(0), mPriority(0.f) -{ - mEditorId.clear(); - mTopicName.clear(); - - mTextDumb.clear(); // FIXME: temp name -} - ESM4::Dialogue::~Dialogue() { } diff --git a/components/esm4/loaddial.hpp b/components/esm4/loaddial.hpp index ef44c841fc..6463da4f19 100644 --- a/components/esm4/loaddial.hpp +++ b/components/esm4/loaddial.hpp @@ -57,7 +57,6 @@ namespace ESM4 float mPriority; - Dialogue(); virtual ~Dialogue(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loaddobj.cpp b/components/esm4/loaddobj.cpp index 307674a5db..b81e29c9fc 100644 --- a/components/esm4/loaddobj.cpp +++ b/components/esm4/loaddobj.cpp @@ -37,13 +37,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::DefaultObj::DefaultObj() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - - std::memset(&mData, 0, sizeof(Defaults)); -} - ESM4::DefaultObj::~DefaultObj() { } diff --git a/components/esm4/loaddobj.hpp b/components/esm4/loaddobj.hpp index 6d708fcbbc..b9557bbb05 100644 --- a/components/esm4/loaddobj.hpp +++ b/components/esm4/loaddobj.hpp @@ -87,7 +87,6 @@ namespace ESM4 Defaults mData; - DefaultObj(); virtual ~DefaultObj(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loaddoor.cpp b/components/esm4/loaddoor.cpp index 45ac1f0b6c..7af92fa870 100644 --- a/components/esm4/loaddoor.cpp +++ b/components/esm4/loaddoor.cpp @@ -31,14 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Door::Door() : mFormId(0), mFlags(0), mBoundRadius(0.f), mDoorFlags(0), mScriptId(0), - mOpenSound(0), mCloseSound(0), mLoopSound(0), mRandomTeleport(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::Door::~Door() { } diff --git a/components/esm4/loaddoor.hpp b/components/esm4/loaddoor.hpp index 0a332339d5..71e7ae70ac 100644 --- a/components/esm4/loaddoor.hpp +++ b/components/esm4/loaddoor.hpp @@ -63,7 +63,6 @@ namespace ESM4 FormId mLoopSound; FormId mRandomTeleport; - Door(); virtual ~Door(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadeyes.cpp b/components/esm4/loadeyes.cpp index 059bee6c37..d4f4fc4bbb 100644 --- a/components/esm4/loadeyes.cpp +++ b/components/esm4/loadeyes.cpp @@ -31,15 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Eyes::Eyes() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mIcon.clear(); - - mData.flags = 0; -} - ESM4::Eyes::~Eyes() { } diff --git a/components/esm4/loadeyes.hpp b/components/esm4/loadeyes.hpp index 814e2a9647..dfc5d5e983 100644 --- a/components/esm4/loadeyes.hpp +++ b/components/esm4/loadeyes.hpp @@ -55,7 +55,6 @@ namespace ESM4 Data mData; - Eyes(); virtual ~Eyes(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadflor.cpp b/components/esm4/loadflor.cpp index fab6c3f0ed..fcc7fa05c1 100644 --- a/components/esm4/loadflor.cpp +++ b/components/esm4/loadflor.cpp @@ -31,14 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Flora::Flora() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0), mIngredient(0), - mSound(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::Flora::~Flora() { } diff --git a/components/esm4/loadflor.hpp b/components/esm4/loadflor.hpp index 2f9e22d548..f4961adf9c 100644 --- a/components/esm4/loadflor.hpp +++ b/components/esm4/loadflor.hpp @@ -65,7 +65,6 @@ namespace ESM4 FormId mSound; Production mPercentHarvest; - Flora(); virtual ~Flora(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadflst.cpp b/components/esm4/loadflst.cpp index 32b23ff284..f73f883148 100644 --- a/components/esm4/loadflst.cpp +++ b/components/esm4/loadflst.cpp @@ -32,11 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::FormIdList::FormIdList() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::FormIdList::~FormIdList() { } diff --git a/components/esm4/loadflst.hpp b/components/esm4/loadflst.hpp index 6fd381aa44..c7e098b9ba 100644 --- a/components/esm4/loadflst.hpp +++ b/components/esm4/loadflst.hpp @@ -47,7 +47,6 @@ namespace ESM4 std::vector mObjects; - FormIdList(); virtual ~FormIdList(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadfurn.cpp b/components/esm4/loadfurn.cpp index 6fba8bc3ce..046f105451 100644 --- a/components/esm4/loadfurn.cpp +++ b/components/esm4/loadfurn.cpp @@ -31,14 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Furniture::Furniture() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0), - mActiveMarkerFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::Furniture::~Furniture() { } diff --git a/components/esm4/loadfurn.hpp b/components/esm4/loadfurn.hpp index 89da61ebf9..c04f78f462 100644 --- a/components/esm4/loadfurn.hpp +++ b/components/esm4/loadfurn.hpp @@ -51,7 +51,6 @@ namespace ESM4 FormId mScriptId; std::uint32_t mActiveMarkerFlags; - Furniture(); virtual ~Furniture(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadglob.cpp b/components/esm4/loadglob.cpp index 6a2fa8b00a..3435726d76 100644 --- a/components/esm4/loadglob.cpp +++ b/components/esm4/loadglob.cpp @@ -32,11 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::GlobalVariable::GlobalVariable() : mFormId(0), mFlags(0), mType(0), mValue(0.f) -{ - mEditorId.clear(); -} - ESM4::GlobalVariable::~GlobalVariable() { } diff --git a/components/esm4/loadglob.hpp b/components/esm4/loadglob.hpp index 15cf4a07ac..59e2c1fbd0 100644 --- a/components/esm4/loadglob.hpp +++ b/components/esm4/loadglob.hpp @@ -47,7 +47,6 @@ namespace ESM4 std::uint8_t mType; float mValue; - GlobalVariable(); virtual ~GlobalVariable(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadgras.cpp b/components/esm4/loadgras.cpp index 3818654fc1..81be002bc9 100644 --- a/components/esm4/loadgras.cpp +++ b/components/esm4/loadgras.cpp @@ -31,12 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Grass::Grass() : mFormId(0), mFlags(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mModel.clear(); -} - ESM4::Grass::~Grass() { } diff --git a/components/esm4/loadgras.hpp b/components/esm4/loadgras.hpp index d7754d03d9..f142779637 100644 --- a/components/esm4/loadgras.hpp +++ b/components/esm4/loadgras.hpp @@ -85,7 +85,6 @@ namespace ESM4 Data mData; - Grass(); virtual ~Grass(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadhair.cpp b/components/esm4/loadhair.cpp index 661c333cbd..f558a46521 100644 --- a/components/esm4/loadhair.cpp +++ b/components/esm4/loadhair.cpp @@ -32,16 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Hair::Hair() : mFormId(0), mFlags(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - - mData.flags = 0; -} - ESM4::Hair::~Hair() { } diff --git a/components/esm4/loadhair.hpp b/components/esm4/loadhair.hpp index c9a4fc2756..22ae6ef605 100644 --- a/components/esm4/loadhair.hpp +++ b/components/esm4/loadhair.hpp @@ -58,7 +58,6 @@ namespace ESM4 Data mData; - Hair(); virtual ~Hair(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadhdpt.cpp b/components/esm4/loadhdpt.cpp index f188890246..ce579f5371 100644 --- a/components/esm4/loadhdpt.cpp +++ b/components/esm4/loadhdpt.cpp @@ -32,15 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::HeadPart::HeadPart() : mFormId(0), mFlags(0), mData(0), mAdditionalPart(0), mBaseTexture(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - - mTriFile.resize(3); -} - ESM4::HeadPart::~HeadPart() { } diff --git a/components/esm4/loadhdpt.hpp b/components/esm4/loadhdpt.hpp index d93411bb7e..9b67b0fce8 100644 --- a/components/esm4/loadhdpt.hpp +++ b/components/esm4/loadhdpt.hpp @@ -28,7 +28,7 @@ #define ESM4_HDPT_H #include -#include +#include #include "formid.hpp" @@ -50,7 +50,7 @@ namespace ESM4 FormId mAdditionalPart; - std::vector mTriFile; + std::array mTriFile; FormId mBaseTexture; HeadPart(); diff --git a/components/esm4/loadidle.cpp b/components/esm4/loadidle.cpp index 3d45b76e82..16bcfcf9dc 100644 --- a/components/esm4/loadidle.cpp +++ b/components/esm4/loadidle.cpp @@ -31,13 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::IdleAnimation::IdleAnimation() : mFormId(0), mFlags(0), mParent(0), mPrevious(0) -{ - mEditorId.clear(); - mCollision.clear(); - mEvent.clear(); -} - ESM4::IdleAnimation::~IdleAnimation() { } diff --git a/components/esm4/loadidle.hpp b/components/esm4/loadidle.hpp index cadd056122..d41d715906 100644 --- a/components/esm4/loadidle.hpp +++ b/components/esm4/loadidle.hpp @@ -49,7 +49,6 @@ namespace ESM4 FormId mParent; // IDLE or AACT FormId mPrevious; - IdleAnimation(); virtual ~IdleAnimation(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadidlm.cpp b/components/esm4/loadidlm.cpp index ba823df300..0aada6a3a3 100644 --- a/components/esm4/loadidlm.cpp +++ b/components/esm4/loadidlm.cpp @@ -32,11 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::IdleMarker::IdleMarker() : mFormId(0), mFlags(0), mIdleFlags(0), mIdleCount(0), mIdleTimer(0.f), mIdleAnim(0) -{ - mEditorId.clear(); -} - ESM4::IdleMarker::~IdleMarker() { } diff --git a/components/esm4/loadidlm.hpp b/components/esm4/loadidlm.hpp index 78d03a7024..717aade9c3 100644 --- a/components/esm4/loadidlm.hpp +++ b/components/esm4/loadidlm.hpp @@ -50,7 +50,6 @@ namespace ESM4 float mIdleTimer; std::vector mIdleAnim; - IdleMarker(); virtual ~IdleMarker(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadimod.cpp b/components/esm4/loadimod.cpp index 9950c59b7b..7be99fbae0 100644 --- a/components/esm4/loadimod.cpp +++ b/components/esm4/loadimod.cpp @@ -34,11 +34,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::ItemMod::ItemMod() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::ItemMod::~ItemMod() { } diff --git a/components/esm4/loadimod.hpp b/components/esm4/loadimod.hpp index a72fbe472d..2fee4f3156 100644 --- a/components/esm4/loadimod.hpp +++ b/components/esm4/loadimod.hpp @@ -46,7 +46,6 @@ namespace ESM4 std::string mEditorId; - ItemMod(); virtual ~ItemMod(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadinfo.cpp b/components/esm4/loadinfo.cpp index a68774112b..d72051e8a7 100644 --- a/components/esm4/loadinfo.cpp +++ b/components/esm4/loadinfo.cpp @@ -33,21 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::DialogInfo::DialogInfo() : mFormId(0), mFlags(0), mQuest(0), mSound(0), - mDialType(0), mNextSpeaker(0), mInfoFlags(0), mParam3(0) -{ - std::memset(&mResponseData, 0, sizeof(TargetResponseData)); - mResponse.clear(); - mNotes.clear(); - mEdits.clear(); - - std::memset(&mTargetCondition, 0, sizeof(TargetCondition)); - - std::memset(&mScript.scriptHeader, 0, sizeof(ScriptHeader)); - mScript.scriptSource.clear(); - mScript.globReference = 0; -} - ESM4::DialogInfo::~DialogInfo() { } diff --git a/components/esm4/loadinfo.hpp b/components/esm4/loadinfo.hpp index be7090cd32..be7e77efc4 100644 --- a/components/esm4/loadinfo.hpp +++ b/components/esm4/loadinfo.hpp @@ -77,7 +77,6 @@ namespace ESM4 ScriptDefinition mScript; // FIXME: ignoring the second one after the NEXT sub-record - DialogInfo(); virtual ~DialogInfo(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadingr.cpp b/components/esm4/loadingr.cpp index 03994dbfb4..38f38463d0 100644 --- a/components/esm4/loadingr.cpp +++ b/components/esm4/loadingr.cpp @@ -32,21 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Ingredient::Ingredient() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - - mData.value = 0; - mData.weight = 0.f; - mEnchantment.value = 0; - mEnchantment.flags = 0; - - std::memset(&mEffect, 0, sizeof(ScriptEffect)); -} - ESM4::Ingredient::~Ingredient() { } diff --git a/components/esm4/loadingr.hpp b/components/esm4/loadingr.hpp index 44312eb24b..c011ff54cf 100644 --- a/components/esm4/loadingr.hpp +++ b/components/esm4/loadingr.hpp @@ -70,7 +70,6 @@ namespace ESM4 Data mData; - Ingredient(); virtual ~Ingredient(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadkeym.cpp b/components/esm4/loadkeym.cpp index a5aba621af..85d348465f 100644 --- a/components/esm4/loadkeym.cpp +++ b/components/esm4/loadkeym.cpp @@ -31,18 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Key::Key() : mFormId(0), mFlags(0), mPickUpSound(0), mDropSound(0), mBoundRadius(0.f), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - mMiniIcon.clear(); - - mData.value = 0; - mData.weight = 0.f; -} - ESM4::Key::~Key() { } diff --git a/components/esm4/loadkeym.hpp b/components/esm4/loadkeym.hpp index d59b3826d5..6a31395618 100644 --- a/components/esm4/loadkeym.hpp +++ b/components/esm4/loadkeym.hpp @@ -64,7 +64,6 @@ namespace ESM4 Data mData; - Key(); virtual ~Key(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadland.cpp b/components/esm4/loadland.cpp index 2bb260da33..aadc2f3aaf 100644 --- a/components/esm4/loadland.cpp +++ b/components/esm4/loadland.cpp @@ -38,17 +38,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Land::Land() : mFormId(0), mFlags(0), mLandFlags(0), mDataTypes(0) -{ - for (int i = 0; i < 4; ++i) - { - mTextures[i].base.formId = 0; - mTextures[i].base.quadrant = 0; - mTextures[i].base.unknown1 = 0; - mTextures[i].base.unknown2 = 0; - } -} - ESM4::Land::~Land() { } diff --git a/components/esm4/loadland.hpp b/components/esm4/loadland.hpp index 6d53a99ff2..80a2490855 100644 --- a/components/esm4/loadland.hpp +++ b/components/esm4/loadland.hpp @@ -123,7 +123,6 @@ namespace ESM4 Texture mTextures[4]; // 0 = bottom left, 1 = bottom right, 2 = top left, 3 = top right std::vector mIds; // land texture (LTEX) formids - Land(); virtual ~Land(); virtual void load(Reader& reader); diff --git a/components/esm4/loadlgtm.cpp b/components/esm4/loadlgtm.cpp index 79867d4106..74486c3615 100644 --- a/components/esm4/loadlgtm.cpp +++ b/components/esm4/loadlgtm.cpp @@ -35,22 +35,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::LightingTemplate::LightingTemplate() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - - mLighting.ambient = 0; - mLighting.directional = 0; - mLighting.fogColor = 0; - mLighting.fogNear = 0.f; - mLighting.fogFar = 0.f; - mLighting.rotationXY = 0; - mLighting.rotationZ = 0; - mLighting.fogDirFade = 0.f; - mLighting.fogClipDist = 0.f; - mLighting.fogPower = FLT_MAX; // hack way to detect TES4 -} - ESM4::LightingTemplate::~LightingTemplate() { } diff --git a/components/esm4/loadlgtm.hpp b/components/esm4/loadlgtm.hpp index 9724d8b16e..9e54bf53d9 100644 --- a/components/esm4/loadlgtm.hpp +++ b/components/esm4/loadlgtm.hpp @@ -50,7 +50,6 @@ namespace ESM4 Lighting mLighting; - LightingTemplate(); virtual ~LightingTemplate(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadligh.cpp b/components/esm4/loadligh.cpp index bdd125c6bb..c4f0a94d51 100644 --- a/components/esm4/loadligh.cpp +++ b/components/esm4/loadligh.cpp @@ -31,15 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Light::Light() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0), mSound(0), - mFade(0.f) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); -} - ESM4::Light::~Light() { } diff --git a/components/esm4/loadligh.hpp b/components/esm4/loadligh.hpp index 4a0120d71a..b1c642eb27 100644 --- a/components/esm4/loadligh.hpp +++ b/components/esm4/loadligh.hpp @@ -42,7 +42,7 @@ namespace ESM4 struct Data { std::uint32_t time; // FO/FONV only - float duration; + float duration = -1; std::uint32_t radius; std::uint32_t colour; // RGBA // flags: @@ -57,18 +57,14 @@ namespace ESM4 // 0x00000200 = Spot Light // 0x00000400 = Spot Shadow std::int32_t flags; - float falloff; - float FOV; + float falloff = 1.f; + float FOV = 90; // FIXME: FOV in degrees or radians? float nearClip; // TES5 only float frequency; // TES5 only float intensityAmplitude; // TES5 only float movementAmplitude; // TES5 only std::uint32_t value; // gold float weight; - Data() : duration(-1), radius(0), colour(0), flags(0), falloff(1.f), FOV(90), - nearClip(0.f), frequency(0.f), intensityAmplitude(0.f), movementAmplitude(0.f), - value(0), weight(0.f) // FIXME: FOV in degrees or radians? - {} }; FormId mFormId; // from the header @@ -88,7 +84,6 @@ namespace ESM4 Data mData; - Light(); virtual ~Light(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadltex.cpp b/components/esm4/loadltex.cpp index 577d5dc8e1..7b442ef8df 100644 --- a/components/esm4/loadltex.cpp +++ b/components/esm4/loadltex.cpp @@ -37,14 +37,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::LandTexture::LandTexture() : mFormId(0), mFlags(0), mHavokFriction(0), mHavokRestitution(0), - mTextureSpecular(0), mGrass(0), mHavokMaterial(0), mTexture(0), - mMaterial(0) -{ - mEditorId.clear(); - mTextureFile.clear(); -} - ESM4::LandTexture::~LandTexture() { } diff --git a/components/esm4/loadltex.hpp b/components/esm4/loadltex.hpp index 934e7cc708..6347df2827 100644 --- a/components/esm4/loadltex.hpp +++ b/components/esm4/loadltex.hpp @@ -62,7 +62,6 @@ namespace ESM4 // ---------------------- - LandTexture(); virtual ~LandTexture(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadlvlc.cpp b/components/esm4/loadlvlc.cpp index 0088446277..cef4c0aff9 100644 --- a/components/esm4/loadlvlc.cpp +++ b/components/esm4/loadlvlc.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::LevelledCreature::LevelledCreature() : mFormId(0), mFlags(0), mScriptId(0), mTemplate(0), - mChanceNone(0), mLvlCreaFlags(0) -{ - mEditorId.clear(); -} - ESM4::LevelledCreature::~LevelledCreature() { } diff --git a/components/esm4/loadlvlc.hpp b/components/esm4/loadlvlc.hpp index ccd08944b5..61f2d90e24 100644 --- a/components/esm4/loadlvlc.hpp +++ b/components/esm4/loadlvlc.hpp @@ -58,7 +58,6 @@ namespace ESM4 bool calcEachItemInCount() const; std::int8_t chanceNone() const; - LevelledCreature(); virtual ~LevelledCreature(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadlvli.cpp b/components/esm4/loadlvli.cpp index 1237a0add4..44395e92ea 100644 --- a/components/esm4/loadlvli.cpp +++ b/components/esm4/loadlvli.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::LevelledItem::LevelledItem() : mFormId(0), mFlags(0), mChanceNone(0), mHasLvlItemFlags(false), - mLvlItemFlags(0), mData(0) -{ - mEditorId.clear(); -} - ESM4::LevelledItem::~LevelledItem() { } diff --git a/components/esm4/loadlvli.hpp b/components/esm4/loadlvli.hpp index 0964370e63..479d556d5c 100644 --- a/components/esm4/loadlvli.hpp +++ b/components/esm4/loadlvli.hpp @@ -54,7 +54,6 @@ namespace ESM4 std::vector mLvlObject; - LevelledItem(); virtual ~LevelledItem(); bool calcAllLvlLessThanPlayer() const; diff --git a/components/esm4/loadlvln.cpp b/components/esm4/loadlvln.cpp index fdd860b9d9..f4782a9c40 100644 --- a/components/esm4/loadlvln.cpp +++ b/components/esm4/loadlvln.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::LevelledNpc::LevelledNpc() : mFormId(0), mFlags(0), mChanceNone(0), mLvlActorFlags(0), mListCount(0) -{ - mEditorId.clear(); - mModel.clear(); -} - ESM4::LevelledNpc::~LevelledNpc() { } diff --git a/components/esm4/loadlvln.hpp b/components/esm4/loadlvln.hpp index 057ed9581d..7c82a44ded 100644 --- a/components/esm4/loadlvln.hpp +++ b/components/esm4/loadlvln.hpp @@ -52,7 +52,6 @@ namespace ESM4 std::uint8_t mListCount; std::vector mLvlObject; - LevelledNpc(); virtual ~LevelledNpc(); inline bool calcAllLvlLessThanPlayer() const { return (mLvlActorFlags & 0x01) != 0; } diff --git a/components/esm4/loadmato.cpp b/components/esm4/loadmato.cpp index fdbdc66ebc..839a6211df 100644 --- a/components/esm4/loadmato.cpp +++ b/components/esm4/loadmato.cpp @@ -31,12 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Material::Material() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mModel.clear(); -} - ESM4::Material::~Material() { } diff --git a/components/esm4/loadmato.hpp b/components/esm4/loadmato.hpp index 9b0d6c3947..8f60824bd8 100644 --- a/components/esm4/loadmato.hpp +++ b/components/esm4/loadmato.hpp @@ -45,7 +45,6 @@ namespace ESM4 std::string mEditorId; std::string mModel; - Material(); virtual ~Material(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadmisc.cpp b/components/esm4/loadmisc.cpp index ee3c10d0b6..8231df28f5 100644 --- a/components/esm4/loadmisc.cpp +++ b/components/esm4/loadmisc.cpp @@ -31,18 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::MiscItem::MiscItem() : mFormId(0), mFlags(0), mPickUpSound(0), mDropSound(0), mBoundRadius(0.f), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - mMiniIcon.clear(); - - mData.value = 0; - mData.weight = 0.f; -} - ESM4::MiscItem::~MiscItem() { } diff --git a/components/esm4/loadmisc.hpp b/components/esm4/loadmisc.hpp index 94f09b1a23..308a6ec326 100644 --- a/components/esm4/loadmisc.hpp +++ b/components/esm4/loadmisc.hpp @@ -64,7 +64,6 @@ namespace ESM4 Data mData; - MiscItem(); virtual ~MiscItem(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadmset.cpp b/components/esm4/loadmset.cpp index b7859f9fa5..67ee5666d1 100644 --- a/components/esm4/loadmset.cpp +++ b/components/esm4/loadmset.cpp @@ -32,24 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::MediaSet::MediaSet() : mFormId(0), mFlags(0), mSetType(-1), mEnabled(0), - mBoundaryDayOuter(0.f), mBoundaryDayMiddle(0.f), mBoundaryDayInner(0.f), - mBoundaryNightOuter(0.f), mBoundaryNightMiddle(0.f), mBoundaryNightInner(0.f), - mLevel8(0.f), mLevel9(0.f), mLevel0(0.f), mLevelA(0.f), mLevelB(0.f), mLevelC(0.f), - mTime1(0.f), mTime2(0.f), mTime3(0.f), mTime4(0.f), - mSoundIntro(0), mSoundOutro(0) -{ - mEditorId.clear(); - mFullName.clear(); - - mSet2.clear(); - mSet3.clear(); - mSet4.clear(); - mSet5.clear(); - mSet6.clear(); - mSet7.clear(); -} - ESM4::MediaSet::~MediaSet() { } diff --git a/components/esm4/loadmset.hpp b/components/esm4/loadmset.hpp index b13c4d6f64..c66273bc6c 100644 --- a/components/esm4/loadmset.hpp +++ b/components/esm4/loadmset.hpp @@ -51,7 +51,7 @@ namespace ESM4 // night outer (NAM5), night middle (NAM6), night inner (NAM7) // Dungeon - intro (HNAM), battle (NAM2), explore (NAM3), suspence (NAM4), outro (INAM) // Incidental - daytime (HNAM), nighttime (INAM) - std::int32_t mSetType; + std::int32_t mSetType = -1; // 0x01 day outer, 0x02 day middle, 0x04 day inner // 0x08 night outer, 0x10 night middle, 0x20 night inner std::uint8_t mEnabled; // for location @@ -86,7 +86,6 @@ namespace ESM4 FormId mSoundIntro; // HNAM FormId mSoundOutro; // INAM - MediaSet(); virtual ~MediaSet(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadmstt.cpp b/components/esm4/loadmstt.cpp index 61d6147b2f..35c69c8a31 100644 --- a/components/esm4/loadmstt.cpp +++ b/components/esm4/loadmstt.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::MovableStatic::MovableStatic() : mFormId(0), mFlags(0), mData(0), mLoopingSound(0) -{ - mEditorId.clear(); - mModel.clear(); -} - ESM4::MovableStatic::~MovableStatic() { } diff --git a/components/esm4/loadmusc.cpp b/components/esm4/loadmusc.cpp index 903bbb5a1f..a328fbce1e 100644 --- a/components/esm4/loadmusc.cpp +++ b/components/esm4/loadmusc.cpp @@ -36,12 +36,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Music::Music() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mMusicFile.clear(); -} - ESM4::Music::~Music() { } diff --git a/components/esm4/loadmusc.hpp b/components/esm4/loadmusc.hpp index ab3889a6c0..2ec10abc8c 100644 --- a/components/esm4/loadmusc.hpp +++ b/components/esm4/loadmusc.hpp @@ -47,7 +47,6 @@ namespace ESM4 std::string mEditorId; std::string mMusicFile; - Music(); virtual ~Music(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadnavi.cpp b/components/esm4/loadnavi.cpp index 0655edb1e8..818a8e98aa 100644 --- a/components/esm4/loadnavi.cpp +++ b/components/esm4/loadnavi.cpp @@ -38,11 +38,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Navigation::Navigation() -{ - mEditorId.clear(); -} - ESM4::Navigation::~Navigation() { } diff --git a/components/esm4/loadnavi.hpp b/components/esm4/loadnavi.hpp index 0db9650c4e..ff0d033f3b 100644 --- a/components/esm4/loadnavi.hpp +++ b/components/esm4/loadnavi.hpp @@ -104,7 +104,6 @@ namespace ESM4 std::map mPathIndexMap; - Navigation(); virtual ~Navigation(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadnavm.cpp b/components/esm4/loadnavm.cpp index 1f3eebe434..1e84a9ffee 100644 --- a/components/esm4/loadnavm.cpp +++ b/components/esm4/loadnavm.cpp @@ -35,10 +35,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::NavMesh::NavMesh() : mFormId(0), mFlags(0) -{ -} - ESM4::NavMesh::~NavMesh() { } diff --git a/components/esm4/loadnavm.hpp b/components/esm4/loadnavm.hpp index f5fb9b5e20..7910b1373d 100644 --- a/components/esm4/loadnavm.hpp +++ b/components/esm4/loadnavm.hpp @@ -98,7 +98,6 @@ namespace ESM4 FormId mFormId; // from the header std::uint32_t mFlags; // from the header, see enum type RecordFlag for details - NavMesh(); virtual ~NavMesh(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadnote.cpp b/components/esm4/loadnote.cpp index ee897258b7..90e39811af 100644 --- a/components/esm4/loadnote.cpp +++ b/components/esm4/loadnote.cpp @@ -32,14 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Note::Note() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); -} - ESM4::Note::~Note() { } diff --git a/components/esm4/loadnote.hpp b/components/esm4/loadnote.hpp index 1ba9bfec24..506674081f 100644 --- a/components/esm4/loadnote.hpp +++ b/components/esm4/loadnote.hpp @@ -47,7 +47,6 @@ namespace ESM4 std::string mModel; std::string mIcon; - Note(); virtual ~Note(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadnpc.cpp b/components/esm4/loadnpc.cpp index e32ee6e90d..51d1d0b181 100644 --- a/components/esm4/loadnpc.cpp +++ b/components/esm4/loadnpc.cpp @@ -41,27 +41,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Npc::Npc() : mFormId(0), mFlags(0), mIsTES4(false), mIsFONV(false), mRace(0), mClass(0), mHair(0), - mEyes(0), mHairLength(0.f), mHairColourId(0), mDeathItem(0), - mScriptId(0), mCombatStyle(0), mSoundBase(0), mSound(0), mSoundChance(0), - mFootWeight(0.f), mBoundRadius(0.f), mBaseTemplate(0), mWornArmor(0), - mDefaultOutfit(0), mSleepOutfit(0), mDefaultPkg(0), mFgRace(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - - mHairColour.red = 0; - mHairColour.green = 0; - mHairColour.blue = 0; - mHairColour.custom = 0; - - std::memset(&mAIData, 0, sizeof(AIData)); - std::memset(&mData, 0, sizeof(Data)); - std::memset(&mBaseConfig, 0, sizeof(ActorBaseConfig)); - std::memset(&mFaction, 0, sizeof(ActorFaction)); -} - ESM4::Npc::~Npc() { } diff --git a/components/esm4/loadnpc.hpp b/components/esm4/loadnpc.hpp index d30ca5f14f..1bd38e189c 100644 --- a/components/esm4/loadnpc.hpp +++ b/components/esm4/loadnpc.hpp @@ -217,7 +217,6 @@ namespace ESM4 std::vector mSymTextureModeCoefficients; // size 0 or 50 std::int16_t mFgRace; - Npc(); virtual ~Npc(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadotft.cpp b/components/esm4/loadotft.cpp index dec2a05666..d1b1bb23a7 100644 --- a/components/esm4/loadotft.cpp +++ b/components/esm4/loadotft.cpp @@ -32,11 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Outfit::Outfit() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::Outfit::~Outfit() { } diff --git a/components/esm4/loadotft.hpp b/components/esm4/loadotft.hpp index 3b1db34d0e..b982a3c468 100644 --- a/components/esm4/loadotft.hpp +++ b/components/esm4/loadotft.hpp @@ -47,7 +47,6 @@ namespace ESM4 std::vector mInventory; - Outfit(); virtual ~Outfit(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadpack.cpp b/components/esm4/loadpack.cpp index 241147df00..5ab9555cd6 100644 --- a/components/esm4/loadpack.cpp +++ b/components/esm4/loadpack.cpp @@ -33,20 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::AIPackage::AIPackage() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - - std::memset(&mData, 0, sizeof(PKDT)); - std::memset(&mSchedule, 0, sizeof(PSDT)); - std::memset(&mLocation, 0, sizeof(PLDT)); - mLocation.type = 0xff; // default to indicate no location data - std::memset(&mTarget, 0, sizeof(PTDT)); - mTarget.type = 0xff; // default to indicate no target data - - mConditions.clear(); -} - ESM4::AIPackage::~AIPackage() { } diff --git a/components/esm4/loadpack.hpp b/components/esm4/loadpack.hpp index 93a9a8290c..b7fe895941 100644 --- a/components/esm4/loadpack.hpp +++ b/components/esm4/loadpack.hpp @@ -58,14 +58,14 @@ namespace ESM4 struct PLDT // location { - std::int32_t type; // 0 = near ref, 1 = in cell, 2 = current loc, 3 = editor loc, 4 = obj id, 5 = obj type + std::int32_t type = 0xff; // 0 = near ref, 1 = in cell, 2 = current loc, 3 = editor loc, 4 = obj id, 5 = obj type, 0xff = no location data FormId location; // uint32_t if type = 5 std::int32_t radius; }; struct PTDT // target { - std::int32_t type; // 0 = specific ref, 1 = obj id, 2 = obj type + std::int32_t type = 0xff; // 0 = specific ref, 1 = obj id, 2 = obj type, 0xff = no target data FormId target; // uint32_t if type = 2 std::int32_t distance; }; diff --git a/components/esm4/loadpgrd.cpp b/components/esm4/loadpgrd.cpp index c9c3048605..4a95c8af0a 100644 --- a/components/esm4/loadpgrd.cpp +++ b/components/esm4/loadpgrd.cpp @@ -36,16 +36,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Pathgrid::Pathgrid() : mFormId(0), mFlags(0), mData(0) -{ - mEditorId.clear(); - - mNodes.clear(); - mLinks.clear(); - mForeign.clear(); - mObjects.clear(); -} - ESM4::Pathgrid::~Pathgrid() { } diff --git a/components/esm4/loadpgre.cpp b/components/esm4/loadpgre.cpp index 9c3e745ab9..665b07e523 100644 --- a/components/esm4/loadpgre.cpp +++ b/components/esm4/loadpgre.cpp @@ -34,11 +34,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::PlacedGrenade::PlacedGrenade() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::PlacedGrenade::~PlacedGrenade() { } diff --git a/components/esm4/loadpwat.cpp b/components/esm4/loadpwat.cpp index a88adcf4c2..52852b0e8a 100644 --- a/components/esm4/loadpwat.cpp +++ b/components/esm4/loadpwat.cpp @@ -34,11 +34,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::PlaceableWater::PlaceableWater() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::PlaceableWater::~PlaceableWater() { } diff --git a/components/esm4/loadrace.cpp b/components/esm4/loadrace.cpp index 79f635bd48..3fa9661122 100644 --- a/components/esm4/loadrace.cpp +++ b/components/esm4/loadrace.cpp @@ -35,28 +35,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Race::Race() : mFormId(0), mFlags(0), mIsTES5(false) - , mHeightMale(1.f), mHeightFemale(1.f), mWeightMale(1.f), mWeightFemale(1.f) - , mRaceFlags(0), mFaceGenMainClamp(0.f), mFaceGenFaceClamp(0.f), mNumKeywords(0) - , mSkin(0) -{ - mEditorId.clear(); - mFullName.clear(); - mDesc.clear(); - mModelMale.clear(); - mModelFemale.clear(); - - std::memset(&mAttribMale, 0, sizeof(AttributeValues)); - std::memset(&mAttribFemale, 0, sizeof(AttributeValues)); - - mVNAM.resize(2); - mDefaultHair.resize(2); - - mBodyTemplate.bodyPart = 0; - mBodyTemplate.flags = 0; - mBodyTemplate.type = 0; -} - ESM4::Race::~Race() { } diff --git a/components/esm4/loadrace.hpp b/components/esm4/loadrace.hpp index 0cede13b0b..c5912b719b 100644 --- a/components/esm4/loadrace.hpp +++ b/components/esm4/loadrace.hpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "formid.hpp" #include "actor.hpp" // AttributeValues, BodyTemplate @@ -122,10 +123,10 @@ namespace ESM4 std::map mSkillBonus; // DATA - float mHeightMale; - float mHeightFemale; - float mWeightMale; - float mWeightFemale; + float mHeightMale = 1.0f; + float mHeightFemale = 1.0f; + float mWeightMale = 1.0f; + float mWeightFemale = 1.0f; std::uint32_t mRaceFlags; // 0x0001 = playable? std::vector mHeadParts; // see HeadPartIndex @@ -148,8 +149,8 @@ namespace ESM4 std::map mDisposition; // race adjustments std::vector mBonusSpells; // race ability/power - std::vector mVNAM; // don't know what these are; 1 or 2 RACE FormIds - std::vector mDefaultHair; // male/female (HAIR FormId for TES4) + std::array mVNAM; // don't know what these are; 1 or 2 RACE FormIds + std::array mDefaultHair; // male/female (HAIR FormId for TES4) std::uint32_t mNumKeywords; @@ -161,7 +162,6 @@ namespace ESM4 std::vector mHeadPartIdsMale; // TES5 std::vector mHeadPartIdsFemale; // TES5 - Race(); virtual ~Race(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadrefr.cpp b/components/esm4/loadrefr.cpp index 4921fd16ca..24cd3d5cde 100644 --- a/components/esm4/loadrefr.cpp +++ b/components/esm4/loadrefr.cpp @@ -32,29 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Reference::Reference() : mParent(0), mFormId(0), mFlags(0), - mBaseObj(0), mScale(1.f), mOwner(0), mGlobal(0), mFactionRank(-1), - mInitiallyDisabled(false), mIsMapMarker(false), mMapMarker(0), mCount(1), - mAudioLocation(0), mIsLocked(false), mLockLevel(0), mKey(0), mTargetRef(0) -{ - mEditorId.clear(); - mFullName.clear(); - - //mPlacement. - - mEsp.parent = 0; - mEsp.flags = 0; - - mRadio.rangeRadius = 0.f; - mRadio.broadcastRange = 0; - mRadio.staticPercentage = 0.f; - mRadio.posReference = 0; - - mDoor.destDoor = 0; - //mDoor.destPos. - mDoor.flags = 0; -} - ESM4::Reference::~Reference() { } diff --git a/components/esm4/loadrefr.hpp b/components/esm4/loadrefr.hpp index d9c96cbf9f..b631b334ee 100644 --- a/components/esm4/loadrefr.hpp +++ b/components/esm4/loadrefr.hpp @@ -82,10 +82,10 @@ namespace ESM4 FormId mBaseObj; Placement mPlacement; - float mScale; // default 1.f + float mScale = 1.0f; FormId mOwner; FormId mGlobal; - std::int32_t mFactionRank; + std::int32_t mFactionRank = -1; bool mInitiallyDisabled; // TODO may need to check mFlags & 0x800 (initially disabled) bool mIsMapMarker; @@ -93,7 +93,7 @@ namespace ESM4 EnableParent mEsp; - std::uint32_t mCount; // only if > 1 (default 1) + std::uint32_t mCount = 1; // only if > 1 FormId mAudioLocation; @@ -106,7 +106,6 @@ namespace ESM4 FormId mTargetRef; - Reference(); virtual ~Reference(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadregn.cpp b/components/esm4/loadregn.cpp index 6f871e8471..7acda43350 100644 --- a/components/esm4/loadregn.cpp +++ b/components/esm4/loadregn.cpp @@ -39,13 +39,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Region::Region() : mFormId(0), mFlags(0), mWorldId(0), mEdgeFalloff(0) -{ - mEditorId.clear(); - mShader.clear(); - mMapName.clear(); -} - ESM4::Region::~Region() { } diff --git a/components/esm4/loadregn.hpp b/components/esm4/loadregn.hpp index 36ed8eb9d5..86b5ca5799 100644 --- a/components/esm4/loadregn.hpp +++ b/components/esm4/loadregn.hpp @@ -85,7 +85,6 @@ namespace ESM4 RegionData mData; std::vector mSounds; - Region(); virtual ~Region(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadroad.cpp b/components/esm4/loadroad.cpp index cb7742eb7c..fca11db779 100644 --- a/components/esm4/loadroad.cpp +++ b/components/esm4/loadroad.cpp @@ -33,14 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Road::Road() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - - mNodes.clear(); - mLinks.clear(); -} - ESM4::Road::~Road() { } diff --git a/components/esm4/loadroad.hpp b/components/esm4/loadroad.hpp index dad92e858c..85745d000a 100644 --- a/components/esm4/loadroad.hpp +++ b/components/esm4/loadroad.hpp @@ -76,7 +76,6 @@ namespace ESM4 std::vector mNodes; std::vector mLinks; - Road(); virtual ~Road(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadsbsp.cpp b/components/esm4/loadsbsp.cpp index c9af5b856e..9daef0f89c 100644 --- a/components/esm4/loadsbsp.cpp +++ b/components/esm4/loadsbsp.cpp @@ -31,15 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::SubSpace::SubSpace() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - - mDimension.x = 0.f; - mDimension.y = 0.f; - mDimension.z = 0.f; -} - ESM4::SubSpace::~SubSpace() { } diff --git a/components/esm4/loadsbsp.hpp b/components/esm4/loadsbsp.hpp index c0ca7c5ddf..601b2b0cb7 100644 --- a/components/esm4/loadsbsp.hpp +++ b/components/esm4/loadsbsp.hpp @@ -51,7 +51,6 @@ namespace ESM4 std::string mEditorId; Dimension mDimension; - SubSpace(); virtual ~SubSpace(); virtual void load(Reader& reader); diff --git a/components/esm4/loadscol.cpp b/components/esm4/loadscol.cpp index 1990af5f4b..23a3cad1a3 100644 --- a/components/esm4/loadscol.cpp +++ b/components/esm4/loadscol.cpp @@ -34,11 +34,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::StaticCollection::StaticCollection() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::StaticCollection::~StaticCollection() { } diff --git a/components/esm4/loadscol.hpp b/components/esm4/loadscol.hpp index c32cdd3ca9..dc1bf296e1 100644 --- a/components/esm4/loadscol.hpp +++ b/components/esm4/loadscol.hpp @@ -46,7 +46,6 @@ namespace ESM4 std::string mEditorId; - StaticCollection(); virtual ~StaticCollection(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadscpt.cpp b/components/esm4/loadscpt.cpp index cf4bdeb58a..c95a212e75 100644 --- a/components/esm4/loadscpt.cpp +++ b/components/esm4/loadscpt.cpp @@ -33,11 +33,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Script::Script() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); -} - ESM4::Script::~Script() { } diff --git a/components/esm4/loadscpt.hpp b/components/esm4/loadscpt.hpp index 747f49444d..459c552876 100644 --- a/components/esm4/loadscpt.hpp +++ b/components/esm4/loadscpt.hpp @@ -46,7 +46,6 @@ namespace ESM4 ScriptDefinition mScript; - Script(); virtual ~Script(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadscrl.cpp b/components/esm4/loadscrl.cpp index c09147ce5e..c09c38ae90 100644 --- a/components/esm4/loadscrl.cpp +++ b/components/esm4/loadscrl.cpp @@ -32,17 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Scroll::Scroll() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mText.clear(); - - mData.value = 0; - mData.weight = 0.f; -} - ESM4::Scroll::~Scroll() { } diff --git a/components/esm4/loadscrl.hpp b/components/esm4/loadscrl.hpp index a88781a6f8..d4feded5d8 100644 --- a/components/esm4/loadscrl.hpp +++ b/components/esm4/loadscrl.hpp @@ -55,7 +55,6 @@ namespace ESM4 Data mData; - Scroll(); virtual ~Scroll(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadsgst.cpp b/components/esm4/loadsgst.cpp index b46c6bad29..9453cdc27d 100644 --- a/components/esm4/loadsgst.cpp +++ b/components/esm4/loadsgst.cpp @@ -32,20 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::SigilStone::SigilStone() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - - mData.uses = 0; - mData.value = 0; - mData.weight = 0.f; - - std::memset(&mEffect, 0, sizeof(ScriptEffect)); -} - ESM4::SigilStone::~SigilStone() { } diff --git a/components/esm4/loadsgst.hpp b/components/esm4/loadsgst.hpp index b0bbf9d800..3a2d32850d 100644 --- a/components/esm4/loadsgst.hpp +++ b/components/esm4/loadsgst.hpp @@ -62,7 +62,6 @@ namespace ESM4 Data mData; - SigilStone(); virtual ~SigilStone(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadslgm.cpp b/components/esm4/loadslgm.cpp index 482c817802..97bbab9569 100644 --- a/components/esm4/loadslgm.cpp +++ b/components/esm4/loadslgm.cpp @@ -31,17 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::SoulGem::SoulGem() : mFormId(0), mFlags(0), mBoundRadius(0.f), mScriptId(0), mSoul(0), mSoulCapacity(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mIcon.clear(); - - mData.value = 0; - mData.weight = 0.f; -} - ESM4::SoulGem::~SoulGem() { } diff --git a/components/esm4/loadslgm.hpp b/components/esm4/loadslgm.hpp index 8724da13c1..e101fbf8a5 100644 --- a/components/esm4/loadslgm.hpp +++ b/components/esm4/loadslgm.hpp @@ -63,7 +63,6 @@ namespace ESM4 Data mData; - SoulGem(); virtual ~SoulGem(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadsndr.cpp b/components/esm4/loadsndr.cpp index 25109e36b6..4c0bf30b24 100644 --- a/components/esm4/loadsndr.cpp +++ b/components/esm4/loadsndr.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::SoundReference::SoundReference() : mFormId(0), mFlags(0), mSoundCategory(0), mSoundId(0), mOutputModel(0) -{ - mEditorId.clear(); - mSoundFile.clear(); -} - ESM4::SoundReference::~SoundReference() { } diff --git a/components/esm4/loadsndr.hpp b/components/esm4/loadsndr.hpp index 17f0491136..fba1912264 100644 --- a/components/esm4/loadsndr.hpp +++ b/components/esm4/loadsndr.hpp @@ -73,7 +73,6 @@ namespace ESM4 TargetCondition mTargetCondition; - SoundReference(); virtual ~SoundReference(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadsoun.cpp b/components/esm4/loadsoun.cpp index 6441d8a799..bcb776e100 100644 --- a/components/esm4/loadsoun.cpp +++ b/components/esm4/loadsoun.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Sound::Sound() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mSoundFile.clear(); -} - ESM4::Sound::~Sound() { } diff --git a/components/esm4/loadsoun.hpp b/components/esm4/loadsoun.hpp index 845f38c380..b766aa5534 100644 --- a/components/esm4/loadsoun.hpp +++ b/components/esm4/loadsoun.hpp @@ -88,7 +88,6 @@ namespace ESM4 SNDX mData; SoundData mExtra; - Sound(); virtual ~Sound(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadstat.cpp b/components/esm4/loadstat.cpp index de487147fe..d08812b4ee 100644 --- a/components/esm4/loadstat.cpp +++ b/components/esm4/loadstat.cpp @@ -32,12 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Static::Static() : mFormId(0), mFlags(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mModel.clear(); -} - ESM4::Static::~Static() { } diff --git a/components/esm4/loadstat.hpp b/components/esm4/loadstat.hpp index 966721ef37..9c689462ef 100644 --- a/components/esm4/loadstat.hpp +++ b/components/esm4/loadstat.hpp @@ -49,7 +49,6 @@ namespace ESM4 float mBoundRadius; std::vector mMODT; // FIXME texture hash - Static(); virtual ~Static(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadtact.cpp b/components/esm4/loadtact.cpp index c082048086..f82e70c483 100644 --- a/components/esm4/loadtact.cpp +++ b/components/esm4/loadtact.cpp @@ -32,14 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::TalkingActivator::TalkingActivator() : mFormId(0), mFlags(0), mScriptId(0), mVoiceType(0), mLoopSound(0), - mRadioTemplate(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); -} - ESM4::TalkingActivator::~TalkingActivator() { } diff --git a/components/esm4/loadtact.hpp b/components/esm4/loadtact.hpp index a1d15524be..f3fd91a433 100644 --- a/components/esm4/loadtact.hpp +++ b/components/esm4/loadtact.hpp @@ -63,7 +63,6 @@ namespace ESM4 FormId mLoopSound; // SOUN FormId mRadioTemplate; // SOUN - TalkingActivator(); virtual ~TalkingActivator(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadterm.cpp b/components/esm4/loadterm.cpp index 68a436d87c..e9eedc3651 100644 --- a/components/esm4/loadterm.cpp +++ b/components/esm4/loadterm.cpp @@ -32,16 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Terminal::Terminal() : mFormId(0), mFlags(0), mScriptId(0), mPasswordNote(0), mSound(0) -{ - mEditorId.clear(); - mFullName.clear(); - mText.clear(); - - mModel.clear(); - mResultText.clear(); -} - ESM4::Terminal::~Terminal() { } diff --git a/components/esm4/loadterm.hpp b/components/esm4/loadterm.hpp index 9fb0ee60a8..1b1486d7a2 100644 --- a/components/esm4/loadterm.hpp +++ b/components/esm4/loadterm.hpp @@ -53,7 +53,6 @@ namespace ESM4 FormId mPasswordNote; FormId mSound; - Terminal(); virtual ~Terminal(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadtree.cpp b/components/esm4/loadtree.cpp index 7029222758..c70863a51b 100644 --- a/components/esm4/loadtree.cpp +++ b/components/esm4/loadtree.cpp @@ -31,13 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Tree::Tree() : mFormId(0), mFlags(0), mBoundRadius(0.f) -{ - mEditorId.clear(); - mModel.clear(); - mLeafTexture.clear(); -} - ESM4::Tree::~Tree() { } diff --git a/components/esm4/loadtree.hpp b/components/esm4/loadtree.hpp index 2069f93d95..2c88812b46 100644 --- a/components/esm4/loadtree.hpp +++ b/components/esm4/loadtree.hpp @@ -49,7 +49,6 @@ namespace ESM4 std::string mLeafTexture; - Tree(); virtual ~Tree(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadtxst.cpp b/components/esm4/loadtxst.cpp index ce281d4848..51f58c9816 100644 --- a/components/esm4/loadtxst.cpp +++ b/components/esm4/loadtxst.cpp @@ -32,19 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::TextureSet::TextureSet() : mFormId(0), mFlags(0) -{ - mEditorId.clear(); - mDiffuse.clear(); - mNormalMap.clear(); - mEnvMask.clear(); - mToneMap.clear(); - mDetailMap.clear(); - mEnvMap.clear(); - mUnknown.clear(); - mSpecular.clear(); -} - ESM4::TextureSet::~TextureSet() { } diff --git a/components/esm4/loadtxst.hpp b/components/esm4/loadtxst.hpp index cc81923e1f..71251c2dcb 100644 --- a/components/esm4/loadtxst.hpp +++ b/components/esm4/loadtxst.hpp @@ -53,7 +53,6 @@ namespace ESM4 std::string mUnknown; std::string mSpecular; - TextureSet(); virtual ~TextureSet(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadweap.cpp b/components/esm4/loadweap.cpp index b56e01171c..463496187e 100644 --- a/components/esm4/loadweap.cpp +++ b/components/esm4/loadweap.cpp @@ -31,17 +31,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::Weapon::Weapon() : mFormId(0), mFlags(0), mPickUpSound(0), mDropSound(0), mBoundRadius(0.f), mScriptId(0), - mEnchantmentPoints(0), mEnchantment(0) -{ - mEditorId.clear(); - mFullName.clear(); - mModel.clear(); - mText.clear(); - mIcon.clear(); - mMiniIcon.clear(); -} - ESM4::Weapon::~Weapon() { } diff --git a/components/esm4/loadweap.hpp b/components/esm4/loadweap.hpp index dae2da1e7e..7128e26ec9 100644 --- a/components/esm4/loadweap.hpp +++ b/components/esm4/loadweap.hpp @@ -83,7 +83,6 @@ namespace ESM4 Data mData; - Weapon(); virtual ~Weapon(); virtual void load(ESM4::Reader& reader); diff --git a/components/esm4/loadwrld.cpp b/components/esm4/loadwrld.cpp index ec01556338..ca8e5fd2c5 100644 --- a/components/esm4/loadwrld.cpp +++ b/components/esm4/loadwrld.cpp @@ -32,25 +32,6 @@ #include "reader.hpp" //#include "writer.hpp" -ESM4::World::World() : mFormId(0), mFlags(0), mParent(0), mWorldFlags(0), mClimate(0), mWater(0), - mLandLevel(0.f), mWaterLevel(0.f), // -2700.f and -14000.f for TES5 - mMinX(0), mMinY(0), mMaxX(0), mMaxY(0), mSound(0), mMusic(0), mParentUseFlags(0) -{ - mEditorId.clear(); - mFullName.clear(); - mMapFile.clear(); - - mMap.width = 0; - mMap.height = 0; - mMap.NWcellX = 0; - mMap.NWcellY = 0; - mMap.SEcellX = 0; - mMap.SEcellY = 0; - mMap.minHeight = 0.f; - mMap.maxHeight = 0.f; - mMap.initialPitch = 0.f; -} - ESM4::World::~World() { } diff --git a/components/esm4/loadwrld.hpp b/components/esm4/loadwrld.hpp index 0105dc12f4..5937670daf 100644 --- a/components/esm4/loadwrld.hpp +++ b/components/esm4/loadwrld.hpp @@ -126,7 +126,6 @@ namespace ESM4 std::vector mCells; std::vector mRoads; - World(); virtual ~World(); virtual void load(ESM4::Reader& reader);