Fixed Coverity reported issue.

CID 11812: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _lastFrameUsed is not initialized in this constructor nor in any functions that it calls.
Non-static class member _s is not initialized in this constructor nor in any functions that it calls.
Non-static class member _t is not initialized in this constructor nor in any functions that it calls.
This commit is contained in:
Robert Osfield
2011-05-09 10:54:50 +00:00
parent 07a29e39e0
commit 74dab1fe8d

View File

@@ -29,27 +29,35 @@
using namespace osg;
using namespace osgSim;
ImpostorSprite::ImpostorSprite()
ImpostorSprite::ImpostorSprite():
_parent(0),
_ism(0),
_previous(0),
_next(0),
_lastFrameUsed(osg::UNINITIALIZED_FRAME_NUMBER),
_texture(0),
_s(0),
_t(0)
{
// don't use display list since we will be updating the geometry.
_useDisplayList = false;
_parent = NULL;
_ism = NULL;
_previous = NULL;
_next = NULL;
_lastFrameUsed = osg::UNINITIALIZED_FRAME_NUMBER;
_texture = NULL;
_s = 0;
_t = 0;
setUseDisplayList(false);
_color.set(1.0f, 1.0f, 1.0f, 1.0f );
}
ImpostorSprite::ImpostorSprite(const ImpostorSprite&): Drawable() {}
ImpostorSprite::ImpostorSprite(const ImpostorSprite&):
osg::Drawable(),
_parent(0),
_ism(0),
_previous(0),
_next(0),
_lastFrameUsed(osg::UNINITIALIZED_FRAME_NUMBER),
_texture(0),
_s(0),
_t(0)
{
setUseDisplayList(false);
_color.set(1.0f, 1.0f, 1.0f, 1.0f );
}
ImpostorSprite::~ImpostorSprite()
{