Initialize variables to avoid undefined values

pull/2596/head
Andrei Kortunov 5 years ago
parent 0d6f0a9b4d
commit af41e9acc1

@ -21,6 +21,7 @@ namespace MWMechanics
Enchanting::Enchanting() Enchanting::Enchanting()
: mCastStyle(ESM::Enchantment::CastOnce) : mCastStyle(ESM::Enchantment::CastOnce)
, mSelfEnchanting(false) , mSelfEnchanting(false)
, mWeaponType(-1)
{} {}
void Enchanting::setOldItem(const MWWorld::Ptr& oldItem) void Enchanting::setOldItem(const MWWorld::Ptr& oldItem)

@ -301,7 +301,7 @@ namespace NifOsg
private: private:
Vec3Interpolator mData; Vec3Interpolator mData;
TargetColor mTargetColor; TargetColor mTargetColor = Ambient;
}; };
class FlipController : public SceneUtil::StateSetUpdater, public SceneUtil::Controller class FlipController : public SceneUtil::StateSetUpdater, public SceneUtil::Controller

@ -36,7 +36,6 @@ namespace Terrain
osg::ref_ptr<osg::Node> getChunk(float size, const osg::Vec2f& center, unsigned char lod, unsigned int lodFlags); osg::ref_ptr<osg::Node> getChunk(float size, const osg::Vec2f& center, unsigned char lod, unsigned int lodFlags);
void setCullingActive(bool active) { mCullingActive = active; }
void setCompositeMapSize(unsigned int size) { mCompositeMapSize = size; } void setCompositeMapSize(unsigned int size) { mCompositeMapSize = size; }
void setCompositeMapLevel(float level) { mCompositeMapLevel = level; } void setCompositeMapLevel(float level) { mCompositeMapLevel = level; }
void setMaxCompositeGeometrySize(float maxCompGeometrySize) { mMaxCompGeometrySize = maxCompGeometrySize; } void setMaxCompositeGeometrySize(float maxCompGeometrySize) { mMaxCompGeometrySize = maxCompGeometrySize; }
@ -65,8 +64,6 @@ namespace Terrain
unsigned int mCompositeMapSize; unsigned int mCompositeMapSize;
float mCompositeMapLevel; float mCompositeMapLevel;
float mMaxCompGeometrySize; float mMaxCompGeometrySize;
bool mCullingActive;
}; };
} }

Loading…
Cancel
Save