1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025616: Avoid Classes using "new" to allocate Instances but not defining a copy Constructor

The empty copy constructor, assignemnts operator, default constructors added to the following classes:
The following classes use “new” function without Handles:
- Select3D_PointData
- BSB_T3Bits
- IntPatch_InfoPD
- LDOM_StringElem
- BinomAllocator
- ProjLib_OnSurface
- Standard_MMgrFactory

Useless declaration of default constructor have been deleted.
This commit is contained in:
azn
2015-01-15 14:41:27 +03:00
committed by bugmaster
parent c8be748cd4
commit 6a38ff486c
8 changed files with 96 additions and 57 deletions

View File

@@ -123,7 +123,10 @@ static long unsigned _P2[32] = { 1,2,4,8, 16,32,64,128, 256,512,1024,2048,
1048576,2097152,4194304,8388608,
16777216,33554432,67108864,134217728,
268435456,536870912,1073741824,2147483648U};
class BSB_T3Bits { //-- size is power of 2 > 4
//-- size is power of 2 > 4
class BSB_T3Bits
{
public:
Standard_Integer _DECAL;
@@ -162,26 +165,36 @@ public:
Standard_Integer NbAxisZ(const Standard_Integer i) { return(axisZ[0][i]); }
inline Standard_Integer GrilleInteger(Standard_Integer ix,
Standard_Integer iy,
Standard_Integer iz) {
Standard_Integer iy,
Standard_Integer iz)
{
Standard_Integer tz = iz<<_DECAL2;
Standard_Integer ty = iy<<_DECAL;
Standard_Integer t = ix;
t|=ty; t|=tz;
t|=ty;
t|=tz;
return(t);
}
inline void IntegerGrille(Standard_Integer t,
Standard_Integer &ix,
Standard_Integer &iy,
Standard_Integer &iz) {
Standard_Integer &ix,
Standard_Integer &iy,
Standard_Integer &iz)
{
ix = t & _BASEM1; t>>=_DECAL;
iy = t & _BASEM1; t>>=_DECAL;
iz = t;
}
private:
BSB_T3Bits (const BSB_T3Bits&);
BSB_T3Bits& operator= (const BSB_T3Bits&);
};
//=======================================================================
BSB_T3Bits::~BSB_T3Bits() {
BSB_T3Bits::~BSB_T3Bits()
{
if(p) { delete [] p; p=0; }
#if DEBUG
printf("\n BASE:%d\n",_BASE);