From 33648313a68efad40eebf4d218261b5d00845ea1 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 9 Jan 2021 14:21:57 +0400 Subject: [PATCH] Initialize variables --- apps/openmw/mwphysics/mtphysics.cpp | 3 +++ components/nif/node.hpp | 4 ++-- components/nif/property.hpp | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwphysics/mtphysics.cpp b/apps/openmw/mwphysics/mtphysics.cpp index 0d1e5962a..3e4ed9b47 100644 --- a/apps/openmw/mwphysics/mtphysics.cpp +++ b/apps/openmw/mwphysics/mtphysics.cpp @@ -152,6 +152,9 @@ namespace MWPhysics , mNextLOS(0) , mFrameNumber(0) , mTimer(osg::Timer::instance()) + , mTimeBegin(0) + , mTimeEnd(0) + , mFrameStart(0) { mNumThreads = Config::computeNumThreads(mThreadSafeBullet); diff --git a/components/nif/node.hpp b/components/nif/node.hpp index 1d082b8f9..406a4d454 100644 --- a/components/nif/node.hpp +++ b/components/nif/node.hpp @@ -177,7 +177,7 @@ struct Node : public Named // NiNodes (or types derived from NiNodes) can be parents. NiNode *parent; - bool isBone; + bool isBone{false}; void setBone() { @@ -378,7 +378,7 @@ struct NiCamera : Node struct NiSwitchNode : public NiNode { unsigned int switchFlags{0}; - unsigned int initialIndex; + unsigned int initialIndex{0}; void read(NIFStream *nif) override { diff --git a/components/nif/property.hpp b/components/nif/property.hpp index eccb442f7..008e84515 100644 --- a/components/nif/property.hpp +++ b/components/nif/property.hpp @@ -61,7 +61,7 @@ struct NiTexturingProperty : public Property 3 - hilight // These two are for PS2 only? 4 - hilight2 */ - unsigned int apply; + unsigned int apply{0}; /* * The textures in this list are as follows: @@ -193,7 +193,7 @@ struct S_MaterialProperty // The vector components are R,G,B osg::Vec3f ambient{1.f,1.f,1.f}, diffuse{1.f,1.f,1.f}; osg::Vec3f specular, emissive; - float glossiness, alpha; + float glossiness{0.f}, alpha{0.f}; void read(NIFStream *nif); };