Fix for some coverity scan defects

c++11
scrawl 10 years ago
parent dcb8fbc69c
commit bf9c62fa42

@ -72,6 +72,11 @@ namespace MWGui
{
MarkerUserData(MWRender::LocalMap* map)
: mLocalMapRender(map)
, interior(false)
, cellX(0)
, cellY(0)
, nX(0.f)
, nY(0.f)
{
}

@ -88,7 +88,8 @@ namespace MWRender
struct ImageDest
{
ImageDest()
: mFramesUntilDone(3) // wait an extra frame to ensure the draw thread has completed its frame.
: mX(0), mY(0)
, mFramesUntilDone(3) // wait an extra frame to ensure the draw thread has completed its frame.
{
}

@ -65,10 +65,6 @@ namespace MWRender
osg::ref_ptr<osg::PositionAttitudeTransform> mParticleNode;
std::vector<Emitter> mEmitters;
float mRippleLifeTime;
float mRippleRotSpeed;
};
}

@ -162,6 +162,12 @@ protected:
class CloudUpdater : public SceneUtil::StateSetUpdater
{
public:
CloudUpdater()
: mAnimationTimer(0.f)
, mOpacity(0.f)
{
}
void setAnimationTimer(float timer)
{
mAnimationTimer = timer;
@ -762,9 +768,6 @@ public:
mat->setColorMode(osg::Material::OFF);
stateset->setAttributeAndModes(mat, osg::StateAttribute::ON);
}
private:
float mAlpha;
};
void SkyManager::createRain()

@ -165,6 +165,8 @@ public:
Drawable(const Drawable &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
: osg::Drawable(copy, copyop)
, mParent(copy.mParent)
, mWriteTo(0)
, mReadFrom(0)
{
}

@ -407,6 +407,7 @@ FlipController::FlipController(int texSlot, float delta, std::vector<osg::ref_pt
}
FlipController::FlipController()
: mDelta(0.f)
{
}
@ -434,6 +435,7 @@ ParticleSystemController::ParticleSystemController(const Nif::NiParticleSystemCo
}
ParticleSystemController::ParticleSystemController()
: mEmitStart(0.f), mEmitStop(0.f)
{
}

@ -45,7 +45,7 @@ void InverseWorldMatrix::operator()(osg::Node *node, osg::NodeVisitor *nv)
osg::NodePath path = nv->getNodePath();
path.pop_back();
osg::MatrixTransform* trans = dynamic_cast<osg::MatrixTransform*>(node);
osg::MatrixTransform* trans = static_cast<osg::MatrixTransform*>(node);
osg::Matrix mat = osg::computeLocalToWorld( path );
mat.orthoNormalize(mat); // don't undo the scale

Loading…
Cancel
Save