From de30bf3f1c6a81d6eb7e300f4a2fcf57d8de055c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 May 2011 12:30:58 +0000 Subject: [PATCH] Fixed Coverity reported issue. CID 11828: Uninitialized scalar field (UNINIT_CTOR) Non-static class member distance is not initialized in this constructor nor in any functions that it calls. Non-static class member maxDistance is not initialized in this constructor nor in any functions that it calls. Non-static class member numIntersectionPoints is not initialized in this constructor nor in any functions that it calls. Non-static class member primitiveIndex is not initialized in this constructor nor in any functions that it calls. --- include/osgUtil/PolytopeIntersector | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/osgUtil/PolytopeIntersector b/include/osgUtil/PolytopeIntersector index 8c1357dff..4e2a0b4ef 100644 --- a/include/osgUtil/PolytopeIntersector +++ b/include/osgUtil/PolytopeIntersector @@ -46,7 +46,11 @@ class OSGUTIL_EXPORT PolytopeIntersector : public Intersector struct Intersection { - Intersection() {} + Intersection(): + distance(0.0), + maxDistance(0.0), + numIntersectionPoints(0), + primitiveIndex(0) {} bool operator < (const Intersection& rhs) const {