Fixed Coverity reported issue.

CID 11825: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.

CID 11824: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _hit is not initialized in this constructor nor in any functions that it calls.
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
Non-static class member _length is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.
This commit is contained in:
Robert Osfield
2011-05-06 12:24:19 +00:00
parent ea29adba87
commit c5c2080dd3

View File

@@ -31,7 +31,9 @@ using namespace osgUtil;
Hit::Hit()
Hit::Hit():
_ratio(0.0f),
_primitiveIndex(0)
{
}
@@ -444,7 +446,11 @@ struct TriangleIntersect
TriangleHitList _thl;
TriangleIntersect()
TriangleIntersect():
_length(0.0f),
_index(0),
_ratio(0.0f),
_hit(false)
{
}