diff --git a/apps/opencs/model/doc/document.cpp b/apps/opencs/model/doc/document.cpp index 0b7b73693c..48a668c8cf 100644 --- a/apps/opencs/model/doc/document.cpp +++ b/apps/opencs/model/doc/document.cpp @@ -21,6 +21,7 @@ void CSMDoc::Document::addGmsts() ESM::GameSetting gmst; gmst.mId = CSMWorld::DefaultGmsts::Floats[i]; gmst.mValue.setType (ESM::VT_Float); + gmst.mRecordFlags = 0; gmst.mValue.setFloat (CSMWorld::DefaultGmsts::FloatsDefaultValues[i]); getData().getGmsts().add (gmst); } @@ -30,6 +31,7 @@ void CSMDoc::Document::addGmsts() ESM::GameSetting gmst; gmst.mId = CSMWorld::DefaultGmsts::Ints[i]; gmst.mValue.setType (ESM::VT_Int); + gmst.mRecordFlags = 0; gmst.mValue.setInteger (CSMWorld::DefaultGmsts::IntsDefaultValues[i]); getData().getGmsts().add (gmst); } @@ -39,6 +41,7 @@ void CSMDoc::Document::addGmsts() ESM::GameSetting gmst; gmst.mId = CSMWorld::DefaultGmsts::Strings[i]; gmst.mValue.setType (ESM::VT_String); + gmst.mRecordFlags = 0; gmst.mValue.setString (""); getData().getGmsts().add (gmst); } @@ -164,6 +167,7 @@ void CSMDoc::Document::createBase() { ESM::Global record; record.mId = sGlobals[i]; + record.mRecordFlags = 0; record.mValue.setType (i==2 ? ESM::VT_Float : ESM::VT_Long); if (i==0 || i==1) diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 939316fa60..247900f407 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -1032,6 +1032,7 @@ void CSMWorld::Data::loadFallbackEntries() ESM::Static newMarker; newMarker.mId = marker.first; newMarker.mModel = marker.second; + newMarker.mRecordFlags = 0; auto record = std::make_unique>(); record->mBase = newMarker; record->mState = CSMWorld::RecordBase::State_BaseOnly; @@ -1046,6 +1047,7 @@ void CSMWorld::Data::loadFallbackEntries() ESM::Door newMarker; newMarker.mId = marker.first; newMarker.mModel = marker.second; + newMarker.mRecordFlags = 0; auto record = std::make_unique>(); record->mBase = newMarker; record->mState = CSMWorld::RecordBase::State_BaseOnly; diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 0cfde25569..99ce882688 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -27,7 +27,10 @@ namespace CSMWorld const RefIdColumn *mType; const RefIdColumn *mBlocked; - BaseColumns () : mBlocked(nullptr) {} + BaseColumns () : mId(nullptr) + , mModified(nullptr) + , mType(nullptr) + , mBlocked(nullptr) {} }; /// \brief Base adapter for all refereceable record types diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index cac6be3658..b8b0f0b822 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -459,6 +459,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager) , mScriptBlacklistUse (true) , mNewGame (false) , mCfgMgr(configurationManager) + , mGlMaxTextureImageUnits(0) { SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); // We use only gamepads diff --git a/apps/openmw/mwgui/charactercreation.cpp b/apps/openmw/mwgui/charactercreation.cpp index ed5a5e12d1..5300f00106 100644 --- a/apps/openmw/mwgui/charactercreation.cpp +++ b/apps/openmw/mwgui/charactercreation.cpp @@ -494,6 +494,7 @@ namespace MWGui klass.mDescription = mCreateClassDialog->getDescription(); klass.mData.mSpecialization = mCreateClassDialog->getSpecializationId(); klass.mData.mIsPlayable = 0x1; + klass.mRecordFlags = 0; std::vector attributes = mCreateClassDialog->getFavoriteAttributes(); assert(attributes.size() == 2); diff --git a/apps/openmw/mwworld/manualref.cpp b/apps/openmw/mwworld/manualref.cpp index 42771bc72c..b809a81b3e 100644 --- a/apps/openmw/mwworld/manualref.cpp +++ b/apps/openmw/mwworld/manualref.cpp @@ -11,17 +11,8 @@ namespace const T* base = list.find(name); ESM::CellRef cellRef; - cellRef.mRefNum.unset(); + cellRef.blank(); cellRef.mRefID = name; - cellRef.mScale = 1; - cellRef.mFactionRank = 0; - cellRef.mChargeInt = -1; - cellRef.mChargeIntRemainder = 0.0f; - cellRef.mGoldValue = 1; - cellRef.mEnchantmentCharge = -1; - cellRef.mTeleport = false; - cellRef.mLockLevel = 0; - cellRef.mReferenceBlocked = 0; MWWorld::LiveCellRef ref(cellRef, base); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index c626ef9d46..0bcfc4f75e 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -490,6 +490,7 @@ namespace MWWorld ESM::Global record; record.mId = params.first; record.mValue = params.second; + record.mRecordFlags = 0; mStore.insertStatic(record); } } @@ -509,6 +510,7 @@ namespace MWWorld ESM::Static record; record.mId = params.first; record.mModel = params.second; + record.mRecordFlags = 0; mStore.insertStatic(record); } } @@ -523,6 +525,7 @@ namespace MWWorld ESM::Door record; record.mId = params.first; record.mModel = params.second; + record.mRecordFlags = 0; mStore.insertStatic(record); } } diff --git a/components/esm3/loadcont.hpp b/components/esm3/loadcont.hpp index 3fbb180d1b..0a28a89015 100644 --- a/components/esm3/loadcont.hpp +++ b/components/esm3/loadcont.hpp @@ -19,7 +19,7 @@ class ESMWriter; struct ContItem { - int mCount; + int mCount{0}; std::string mItem; }; diff --git a/components/fx/widgets.hpp b/components/fx/widgets.hpp index f787b910c8..67f7883a67 100644 --- a/components/fx/widgets.hpp +++ b/components/fx/widgets.hpp @@ -66,8 +66,8 @@ namespace fx void initialiseOverride() override; void notifyMouseButtonClick(MyGUI::Widget* sender); - MyGUI::Button* mCheckbutton; - MyGUI::Widget* mFill; + MyGUI::Button* mCheckbutton{nullptr}; + MyGUI::Widget* mFill{nullptr}; }; template @@ -236,11 +236,11 @@ namespace fx increment(uniform->mStep); } - MyGUI::Button* mButtonDecrease; - MyGUI::Button* mButtonIncrease; - MyGUI::Widget* mDragger; - MyGUI::Widget* mFill; - MyGUI::TextBox* mValueLabel; + MyGUI::Button* mButtonDecrease{nullptr}; + MyGUI::Button* mButtonIncrease{nullptr}; + MyGUI::Widget* mDragger{nullptr}; + MyGUI::Widget* mFill{nullptr}; + MyGUI::TextBox* mValueLabel{nullptr}; T mValue; int mLastPointerX; @@ -271,9 +271,9 @@ namespace fx void initialiseOverride() override; - Gui::AutoSizedButton* mReset; - Gui::AutoSizedTextBox* mLabel; - MyGUI::Widget* mClient; + Gui::AutoSizedButton* mReset{nullptr}; + Gui::AutoSizedTextBox* mLabel{nullptr}; + MyGUI::Widget* mClient{nullptr}; std::vector mBases; }; } diff --git a/components/lua_ui/textedit.hpp b/components/lua_ui/textedit.hpp index c2f7f6340c..2235842477 100644 --- a/components/lua_ui/textedit.hpp +++ b/components/lua_ui/textedit.hpp @@ -23,8 +23,8 @@ namespace LuaUi void textChange(MyGUI::EditBox*); MyGUI::EditBox* mEditBox = nullptr; - bool mMultiline; - bool mAutoSize; + bool mMultiline{0}; + bool mAutoSize{0}; }; } diff --git a/components/lua_ui/widget.cpp b/components/lua_ui/widget.cpp index 5a747a79d9..e3f45d90dd 100644 --- a/components/lua_ui/widget.cpp +++ b/components/lua_ui/widget.cpp @@ -160,7 +160,7 @@ namespace LuaUi sol::object WidgetExtension::keyEvent(MyGUI::KeyCode code) const { - SDL_Keysym keySym; + auto keySym = SDL_Keysym(); keySym.sym = SDLUtil::myGuiKeyToSdl(code); keySym.scancode = SDL_GetScancodeFromKey(keySym.sym); keySym.mod = SDL_GetModState();