mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
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
This commit is contained in:
parent
6928e35131
commit
4dff6a1bcb
@ -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) {
|
||||
|
@ -18,15 +18,9 @@
|
||||
#define _IntPolyh_StartPoint_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -70,14 +70,6 @@ public:
|
||||
//! <R3> 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 <me> from the definition of the
|
||||
//! colour <Other>.
|
||||
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 <ADelta>.
|
||||
//! <ADelta> is a percentage. Any value greater than zero
|
||||
//! will increase the contrast.
|
||||
|
Loading…
x
Reference in New Issue
Block a user