From 9a52982920d9adafd9e1519fdd81d1c575ff84fd Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 02:13:56 +0300 Subject: [PATCH] 0032678: Coding Rules, ApproxInt_SvSurfaces - eliminate GCC -fsanitize=undefined error ApproxInt_SvSurfaces::myUseSolver is now initialized by default constructor. --- src/ApproxInt/ApproxInt_SvSurfaces.hxx | 29 ++++++-------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/ApproxInt/ApproxInt_SvSurfaces.hxx b/src/ApproxInt/ApproxInt_SvSurfaces.hxx index 33e145c0a6..89509550b7 100644 --- a/src/ApproxInt/ApproxInt_SvSurfaces.hxx +++ b/src/ApproxInt/ApproxInt_SvSurfaces.hxx @@ -38,16 +38,14 @@ class IntSurf_PntOn2S; //! the solver used in intersection algorithm and required values are calculated. //! if myUseSolver = false, u1, v1, u2, v2 are considered as "exact" intersection points on two surfaces //! and required values are calculated directly using u1, v1, u2, v2 -//! - - -class ApproxInt_SvSurfaces +class ApproxInt_SvSurfaces { public: DEFINE_STANDARD_ALLOC - + ApproxInt_SvSurfaces() : myUseSolver (false) {} + //! returns True if Tg,Tguv1 Tguv2 can be computed. Standard_EXPORT virtual Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, @@ -82,35 +80,20 @@ public: gp_Vec2d& Tg) = 0; Standard_EXPORT virtual ~ApproxInt_SvSurfaces(); - Standard_EXPORT virtual void SetUseSolver(const Standard_Boolean theUseSol) + void SetUseSolver (const Standard_Boolean theUseSol) { myUseSolver = theUseSol; } - Standard_EXPORT virtual Standard_Boolean GetUseSolver() const + virtual Standard_Boolean GetUseSolver() const { return myUseSolver; } - -protected: - - - - - private: -Standard_Boolean myUseSolver; - - + Standard_Boolean myUseSolver; }; - - - - - - #endif // _ApproxInt_SvSurfaces_HeaderFile