From 4dff6a1bcb4f533047aeccd02a831069f1014c23 Mon Sep 17 00:00:00 2001 From: azn Date: Wed, 17 Dec 2014 11:06:13 +0300 Subject: [PATCH] 0025618: Avoid classes with an assignment operator and not implementing both a destructor and a copy constructor User-defined assignment operator is removed in the classes IntPolyh_StartPoint and Quantity_Color, as default assignment will be OK --- src/IntPolyh/IntPolyh_StartPoint.cxx | 18 ---------------- src/IntPolyh/IntPolyh_StartPoint.hxx | 32 ---------------------------- src/Quantity/Quantity_Color.cxx | 9 -------- src/Quantity/Quantity_Color.hxx | 8 ------- 4 files changed, 67 deletions(-) diff --git a/src/IntPolyh/IntPolyh_StartPoint.cxx b/src/IntPolyh/IntPolyh_StartPoint.cxx index ebabe23e22..91136a8e6b 100644 --- a/src/IntPolyh/IntPolyh_StartPoint.cxx +++ b/src/IntPolyh/IntPolyh_StartPoint.cxx @@ -92,24 +92,6 @@ Standard_Integer IntPolyh_StartPoint::GetEdgePoints(const IntPolyh_Triangle &Tri return(SurfID) ; } -void IntPolyh_StartPoint::Equal(const IntPolyh_StartPoint &StPt) { - x = StPt.x; - y = StPt.y; - z = StPt.z; - u1 = StPt.u1; - v1 = StPt.v1; - u2 = StPt.u2; - v2 = StPt.v2; - t1 = StPt.t1; - e1 = StPt.e1; - lambda1 = StPt.lambda1; - t2 = StPt.t2; - e2 = StPt.e2; - lambda2 = StPt.lambda2; - angle = StPt.angle; - chainlist = StPt.chainlist; -} - void IntPolyh_StartPoint::SetXYZ(const Standard_Real XX, const Standard_Real YY, const Standard_Real ZZ) { diff --git a/src/IntPolyh/IntPolyh_StartPoint.hxx b/src/IntPolyh/IntPolyh_StartPoint.hxx index c6add5f7df..596117c245 100644 --- a/src/IntPolyh/IntPolyh_StartPoint.hxx +++ b/src/IntPolyh/IntPolyh_StartPoint.hxx @@ -18,15 +18,9 @@ #define _IntPolyh_StartPoint_HeaderFile #include -#include -#include -#include -#include class IntPolyh_Triangle; - - class IntPolyh_StartPoint { public: @@ -70,12 +64,6 @@ public: Standard_EXPORT Standard_Integer GetEdgePoints (const IntPolyh_Triangle& Triangle, Standard_Integer& FirstEdgePoint, Standard_Integer& SecondEdgePoint, Standard_Integer& LastPoint) const; - Standard_EXPORT void Equal (const IntPolyh_StartPoint& StPt); -void operator = (const IntPolyh_StartPoint& StPt) -{ - Equal(StPt); -} - Standard_EXPORT void SetXYZ (const Standard_Real XX, const Standard_Real YY, const Standard_Real ZZ); Standard_EXPORT void SetUV1 (const Standard_Real UU1, const Standard_Real VV1); @@ -102,19 +90,7 @@ void operator = (const IntPolyh_StartPoint& StPt) Standard_EXPORT void Dump (const Standard_Integer i) const; - - - -protected: - - - - - private: - - - Standard_Real x; Standard_Real y; Standard_Real z; @@ -130,14 +106,6 @@ private: Standard_Integer t2; Standard_Integer e2; Standard_Integer chainlist; - - }; - - - - - - #endif // _IntPolyh_StartPoint_HeaderFile diff --git a/src/Quantity/Quantity_Color.cxx b/src/Quantity/Quantity_Color.cxx index 6d26b3d23c..ca661a035b 100644 --- a/src/Quantity/Quantity_Color.cxx +++ b/src/Quantity/Quantity_Color.cxx @@ -145,15 +145,6 @@ Standard_ShortReal MyHue, MyLight, MySaturation; } -Quantity_Color& Quantity_Color::Assign (const Quantity_Color& Other) { - - MyRed = Standard_ShortReal (Other.Red ()); - MyGreen = Standard_ShortReal (Other.Green ()); - MyBlue = Standard_ShortReal (Other.Blue ()); - return (*this); - -} - void Quantity_Color::SetValues (const Quantity_NameOfColor AName) { Quantity_Color::ValuesOf diff --git a/src/Quantity/Quantity_Color.hxx b/src/Quantity/Quantity_Color.hxx index 59b0b1631c..70c82836bd 100644 --- a/src/Quantity/Quantity_Color.hxx +++ b/src/Quantity/Quantity_Color.hxx @@ -70,14 +70,6 @@ public: //! is the saturation between 0. and 1. Standard_EXPORT Quantity_Color(const Quantity_Parameter R1, const Quantity_Parameter R2, const Quantity_Parameter R3, const Quantity_TypeOfColor AType); - //! Updates the colour from the definition of the - //! colour . - Standard_EXPORT Quantity_Color& Assign (const Quantity_Color& Other); -Quantity_Color& operator = (const Quantity_Color& Other) -{ - return Assign(Other); -} - //! Increases or decreases the contrast by . //! is a percentage. Any value greater than zero //! will increase the contrast.