Moved the setting of _clipPlaneNum from the {} body to the intializer list to

avoid reading from an unitialized variable.
This commit is contained in:
Robert Osfield 2008-01-18 21:01:18 +00:00
parent 1cfba8787a
commit d2d282073c

View File

@ -27,10 +27,10 @@ class OSG_EXPORT ClipPlane : public StateAttribute
public : public :
ClipPlane(); ClipPlane();
inline ClipPlane(unsigned int no) { setClipPlaneNum(no); } inline ClipPlane(unsigned int no):_clipPlaneNum(no) {}
inline ClipPlane(unsigned int no,const Vec4d& plane) { setClipPlaneNum(no); setClipPlane(plane); } inline ClipPlane(unsigned int no,const Vec4d& plane):_clipPlaneNum(no) { setClipPlane(plane); }
inline ClipPlane(unsigned int no,const Plane& plane) { setClipPlaneNum(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) { setClipPlaneNum(no); setClipPlane(a,b,c,d); } 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. */ /** Copy constructor using CopyOp to manage deep vs shallow copy. */
ClipPlane(const ClipPlane& cp,const CopyOp& copyop=CopyOp::SHALLOW_COPY): ClipPlane(const ClipPlane& cp,const CopyOp& copyop=CopyOp::SHALLOW_COPY):