X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Octree.cxx;h=93d241c7e3232ec29be81313474a3c444e08ec34;hp=5b224ae5d8ff163c56c6b4a097cb6373e3f43bea;hb=79b1ac2b6df9117f16f11d444b1f165d477a1813;hpb=984c4ffdd7df62aeaedc544cd0b8e64ff8f53f1a diff --git a/src/SMESH/SMESH_Octree.cxx b/src/SMESH/SMESH_Octree.cxx index 5b224ae5d..93d241c7e 100644 --- a/src/SMESH/SMESH_Octree.cxx +++ b/src/SMESH/SMESH_Octree.cxx @@ -71,8 +71,9 @@ SMESH_Octree::~SMESH_Octree () //=========================================================================== void SMESH_Octree::setBox(const Bnd_B3d* box) { - delete myBox; - myBox=new Bnd_B3d(*box); +// delete myBox; +// myBox=new Bnd_B3d(*box); + *myBox = *box; } //=========================================================================== @@ -81,11 +82,12 @@ void SMESH_Octree::setBox(const Bnd_B3d* box) * \param box - Set box to the 3d Bounding Box of the Octree */ //=========================================================================== -void SMESH_Octree::getBox(Bnd_B3d* box) +void SMESH_Octree::getBox(Bnd_B3d& box) { - if(box != NULL) - delete box; - box = new Bnd_B3d (*myBox); +// if(box != NULL) +// delete box; +// box = new Bnd_B3d (*myBox); + box = *myBox; } //=========================================================================== @@ -135,7 +137,7 @@ void SMESH_Octree::Compute() //================================================================= void SMESH_Octree::buildChildren() { - myChildren = new (SMESH_Octree*)[8]; + myChildren = new SMESH_Octree*[8]; gp_XYZ min = myBox->CornerMin(); gp_XYZ max = myBox->CornerMax();