From d2d282073c829c2e4e348701748d3bbceabae49e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 18 Jan 2008 21:01:18 +0000 Subject: [PATCH] Moved the setting of _clipPlaneNum from the {} body to the intializer list to avoid reading from an unitialized variable. --- include/osg/ClipPlane | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osg/ClipPlane b/include/osg/ClipPlane index 39759c469..fab24d98e 100644 --- a/include/osg/ClipPlane +++ b/include/osg/ClipPlane @@ -27,10 +27,10 @@ class OSG_EXPORT ClipPlane : public StateAttribute public : ClipPlane(); - inline ClipPlane(unsigned int no) { setClipPlaneNum(no); } - inline ClipPlane(unsigned int no,const Vec4d& plane) { setClipPlaneNum(no); setClipPlane(plane); } - inline ClipPlane(unsigned int no,const Plane& plane) { setClipPlaneNum(no); setClipPlane(plane); } - inline ClipPlane(unsigned int no,double a,double b,double c,double d) { setClipPlaneNum(no); setClipPlane(a,b,c,d); } + inline ClipPlane(unsigned int no):_clipPlaneNum(no) {} + inline ClipPlane(unsigned int no,const Vec4d& plane):_clipPlaneNum(no) { setClipPlane(plane); } + inline ClipPlane(unsigned int no,const Plane& plane):_clipPlaneNum(no) { setClipPlane(plane); } + inline ClipPlane(unsigned int no,double a,double b,double c,double d): _clipPlaneNum(no) { setClipPlane(a,b,c,d); } /** Copy constructor using CopyOp to manage deep vs shallow copy. */ ClipPlane(const ClipPlane& cp,const CopyOp& copyop=CopyOp::SHALLOW_COPY):