0025616: Avoid Classes using "new" to allocate Instances but not defining a copy...
[occt.git] / src / Bnd / Bnd_BoundSortBox.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 1dfcd7b..9957b1c
@@ -1,7 +1,18 @@
-// File:       Bnd_BoundSortBox.cxx
-// Created:    Tue Nov 24 16:06:09 1992
-// Author:     Didier PIFFAULT
-//             <dpf@phylox>
+// Created on: 1992-11-24
+// Created by: Didier PIFFAULT
+// Copyright (c) 1992-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <Bnd_BoundSortBox.ixx>
 #include <Standard_NullValue.hxx>
@@ -112,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;
@@ -151,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);
@@ -186,7 +210,12 @@ BSB_T3Bits::~BSB_T3Bits() {
   if(ToTest)  { delete [] ToTest; ToTest=0; } 
 }
 //=======================================================================
-BSB_T3Bits::BSB_T3Bits(int size) {
+BSB_T3Bits::BSB_T3Bits(int size)
+       : ind(0),
+    Xmin(0),Xmax(0),
+       Ymin(0),Ymax(0),
+       Zmin(0),Zmax(0)
+{
   switch (size) { 
   case 128: {  _DECAL=7;   _DECAL2=14;   _BASE=128;  _BASEM1=127;  break; } 
   case  64: {  _DECAL=6;   _DECAL2=12;   _BASE= 64;  _BASEM1= 63;  break; }