mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:29:55 +00:00
Fix for some coverity scan defects
This commit is contained in:
parent
dcb8fbc69c
commit
bf9c62fa42
7 changed files with 18 additions and 9 deletions
|
@ -72,6 +72,11 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
MarkerUserData(MWRender::LocalMap* map)
|
MarkerUserData(MWRender::LocalMap* map)
|
||||||
: mLocalMapRender(map)
|
: mLocalMapRender(map)
|
||||||
|
, interior(false)
|
||||||
|
, cellX(0)
|
||||||
|
, cellY(0)
|
||||||
|
, nX(0.f)
|
||||||
|
, nY(0.f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,8 @@ namespace MWRender
|
||||||
struct ImageDest
|
struct ImageDest
|
||||||
{
|
{
|
||||||
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;
|
osg::ref_ptr<osg::PositionAttitudeTransform> mParticleNode;
|
||||||
|
|
||||||
std::vector<Emitter> mEmitters;
|
std::vector<Emitter> mEmitters;
|
||||||
|
|
||||||
float mRippleLifeTime;
|
|
||||||
float mRippleRotSpeed;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,6 +162,12 @@ protected:
|
||||||
class CloudUpdater : public SceneUtil::StateSetUpdater
|
class CloudUpdater : public SceneUtil::StateSetUpdater
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CloudUpdater()
|
||||||
|
: mAnimationTimer(0.f)
|
||||||
|
, mOpacity(0.f)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void setAnimationTimer(float timer)
|
void setAnimationTimer(float timer)
|
||||||
{
|
{
|
||||||
mAnimationTimer = timer;
|
mAnimationTimer = timer;
|
||||||
|
@ -762,9 +768,6 @@ public:
|
||||||
mat->setColorMode(osg::Material::OFF);
|
mat->setColorMode(osg::Material::OFF);
|
||||||
stateset->setAttributeAndModes(mat, osg::StateAttribute::ON);
|
stateset->setAttributeAndModes(mat, osg::StateAttribute::ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
float mAlpha;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void SkyManager::createRain()
|
void SkyManager::createRain()
|
||||||
|
|
|
@ -165,6 +165,8 @@ public:
|
||||||
Drawable(const Drawable ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
|
Drawable(const Drawable ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
|
||||||
: osg::Drawable(copy, copyop)
|
: osg::Drawable(copy, copyop)
|
||||||
, mParent(copy.mParent)
|
, mParent(copy.mParent)
|
||||||
|
, mWriteTo(0)
|
||||||
|
, mReadFrom(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,7 @@ FlipController::FlipController(int texSlot, float delta, std::vector<osg::ref_pt
|
||||||
}
|
}
|
||||||
|
|
||||||
FlipController::FlipController()
|
FlipController::FlipController()
|
||||||
|
: mDelta(0.f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,6 +435,7 @@ ParticleSystemController::ParticleSystemController(const Nif::NiParticleSystemCo
|
||||||
}
|
}
|
||||||
|
|
||||||
ParticleSystemController::ParticleSystemController()
|
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();
|
osg::NodePath path = nv->getNodePath();
|
||||||
path.pop_back();
|
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 );
|
osg::Matrix mat = osg::computeLocalToWorld( path );
|
||||||
mat.orthoNormalize(mat); // don't undo the scale
|
mat.orthoNormalize(mat); // don't undo the scale
|
||||||
|
|
Loading…
Reference in a new issue