Avoid to use uninitialized variables

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

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

@ -115,7 +115,7 @@ namespace CSMWorld
{
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)

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

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

@ -785,6 +785,7 @@ MWShadowTechnique::MWShadowTechnique():
_debugHud(nullptr)
{
_shadowRecievingPlaceholderStateSet = new osg::StateSet;
mSetDummyStateWhenDisabled = false;
}
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;
_enableShadows = vdsm._enableShadows;
mSetDummyStateWhenDisabled = vdsm.mSetDummyStateWhenDisabled;
}
MWShadowTechnique::~MWShadowTechnique()

Loading…
Cancel
Save