Fixed Coverity reported issue.

CID 11838: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _alphaFuncKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleBackwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleForwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _sampleDensityKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _transparencyKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateAlphaCutOff is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateSampleDensity is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateTransparency is not initialized in this constructor nor in any functions that it calls.
This commit is contained in:
Robert Osfield
2011-05-06 12:27:19 +00:00
parent b37a58e051
commit 7eda51abd2

View File

@@ -319,17 +319,28 @@ class CycleSwitchVisitor : public osgVolume::PropertyVisitor
//
// PropertyAdjustmentCallback
//
PropertyAdjustmentCallback::PropertyAdjustmentCallback()
PropertyAdjustmentCallback::PropertyAdjustmentCallback():
_cyleForwardKey('v'),
_cyleBackwardKey('V'),
_transparencyKey('t'),
_alphaFuncKey('a'),
_sampleDensityKey('d'),
_updateTransparency(false),
_updateAlphaCutOff(false),
_updateSampleDensity(false)
{
_cyleForwardKey = 'v';
_cyleBackwardKey = 'V';
_transparencyKey = 't';
_alphaFuncKey = 'a';
_sampleDensityKey = 'd';
}
_updateTransparency = false;
_updateAlphaCutOff = false;
_updateSampleDensity = false;
PropertyAdjustmentCallback::PropertyAdjustmentCallback(const PropertyAdjustmentCallback& pac,const osg::CopyOp&):
_cyleForwardKey(pac._cyleForwardKey),
_cyleBackwardKey(pac._cyleBackwardKey),
_transparencyKey(pac._transparencyKey),
_alphaFuncKey(pac._alphaFuncKey),
_sampleDensityKey(pac._sampleDensityKey),
_updateTransparency(false),
_updateAlphaCutOff(false),
_updateSampleDensity(false)
{
}
bool PropertyAdjustmentCallback::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&, osg::Object* object, osg::NodeVisitor*)