Avoid to use uninitialized variables

pull/593/head
Andrei Kortunov 4 years ago
parent c5a36ad440
commit 801e2d6ad0

@ -10,7 +10,7 @@
#include "nestedtablewrapper.hpp" #include "nestedtablewrapper.hpp"
CSMWorld::PotionColumns::PotionColumns (const InventoryColumns& columns) CSMWorld::PotionColumns::PotionColumns (const InventoryColumns& columns)
: InventoryColumns (columns) {} : InventoryColumns (columns), mEffects(nullptr) {}
CSMWorld::PotionRefIdAdapter::PotionRefIdAdapter (const PotionColumns& columns, CSMWorld::PotionRefIdAdapter::PotionRefIdAdapter (const PotionColumns& columns,
const RefIdColumn *autoCalc) const RefIdColumn *autoCalc)

@ -115,7 +115,7 @@ namespace CSMWorld
{ {
const RefIdColumn *mModel; const RefIdColumn *mModel;
ModelColumns (const BaseColumns& base) : BaseColumns (base) {} ModelColumns (const BaseColumns& base) : BaseColumns (base), mModel(nullptr) {}
}; };
/// \brief Adapter for IDs with models (all but levelled lists) /// \brief Adapter for IDs with models (all but levelled lists)

@ -21,7 +21,7 @@ namespace Files
LowLevelFile mFile; LowLevelFile mFile;
char mBuffer[sBufferSize]; char mBuffer[sBufferSize]{0};
public: public:
ConstrainedFileStreamBuf(const std::string &fname, size_t start, size_t length) ConstrainedFileStreamBuf(const std::string &fname, size_t start, size_t length)

@ -71,7 +71,7 @@ struct NiParticlesData : public NiGeometryData
{ {
int numParticles{0}; int numParticles{0};
int activeCount; int activeCount{0};
std::vector<float> particleRadii, sizes, rotationAngles; std::vector<float> particleRadii, sizes, rotationAngles;
std::vector<osg::Quat> rotations; std::vector<osg::Quat> rotations;
@ -119,14 +119,14 @@ struct NiPixelData : public Record
NIPXFMT_DXT5, NIPXFMT_DXT5,
NIPXFMT_DXT5_ALT NIPXFMT_DXT5_ALT
}; };
Format fmt; Format fmt{NIPXFMT_RGB8};
unsigned int colorMask[4]; unsigned int colorMask[4]{0};
unsigned int bpp, pixelTiling{0}; unsigned int bpp{0}, pixelTiling{0};
bool sRGB{false}; bool sRGB{false};
NiPalettePtr palette; NiPalettePtr palette;
unsigned int numberOfMipmaps; unsigned int numberOfMipmaps{0};
struct Mipmap struct Mipmap
{ {

@ -785,6 +785,7 @@ MWShadowTechnique::MWShadowTechnique():
_debugHud(nullptr) _debugHud(nullptr)
{ {
_shadowRecievingPlaceholderStateSet = new osg::StateSet; _shadowRecievingPlaceholderStateSet = new osg::StateSet;
mSetDummyStateWhenDisabled = false;
} }
MWShadowTechnique::MWShadowTechnique(const MWShadowTechnique& vdsm, const osg::CopyOp& copyop): MWShadowTechnique::MWShadowTechnique(const MWShadowTechnique& vdsm, const osg::CopyOp& copyop):
@ -792,6 +793,7 @@ MWShadowTechnique::MWShadowTechnique(const MWShadowTechnique& vdsm, const osg::C
{ {
_shadowRecievingPlaceholderStateSet = new osg::StateSet; _shadowRecievingPlaceholderStateSet = new osg::StateSet;
_enableShadows = vdsm._enableShadows; _enableShadows = vdsm._enableShadows;
mSetDummyStateWhenDisabled = vdsm.mSetDummyStateWhenDisabled;
} }
MWShadowTechnique::~MWShadowTechnique() MWShadowTechnique::~MWShadowTechnique()

Loading…
Cancel
Save