]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Windows porting.
authorageay <ageay>
Tue, 9 Mar 2010 15:34:15 +0000 (15:34 +0000)
committerageay <ageay>
Tue, 9 Mar 2010 15:34:15 +0000 (15:34 +0000)
src/INTERP_KERNEL/BBTree.txx
src/INTERP_KERNEL/InterpolationPlanar.txx

index 1e5c7d5cb6174783a7d306d3dbb4584e179820e4..920bc75c487590fc6337b10aab22fcf8f7aa1700 100644 (file)
@@ -125,8 +125,15 @@ public:
       }
     _max_left=max_left+std::abs(_epsilon);
     _min_right=min_right-std::abs(_epsilon);
-    _left=new BBTree(bbs, &(new_elems_left[0]), level+1, new_elems_left.size(),_epsilon);
-    _right=new BBTree(bbs, &(new_elems_right[0]), level+1, new_elems_right.size(),_epsilon);
+    ConnType *tmp;
+    tmp=0;
+    if(!new_elems_left.empty())
+      tmp=&(new_elems_left[0]);
+    _left=new BBTree(bbs, tmp, level+1, new_elems_left.size(),_epsilon);
+    tmp=0;
+    if(!new_elems_right.empty())
+      tmp=&(new_elems_right[0]);
+    _right=new BBTree(bbs, tmp, level+1, new_elems_right.size(),_epsilon);
   
   }
 
index 295360db4fe2205e2686b28c8a31492840cd9b5c..04da661223018a70b4e90052eebfa0e996ab0bf2 100644 (file)
@@ -347,7 +347,10 @@ namespace INTERP_KERNEL
     std::vector<double> bbox;
     intersector->createBoundingBoxes(myMeshS,bbox); // create the bounding boxes
     performAdjustmentOfBB(intersector,bbox);
-    BBTree<SPACEDIM,ConnType> my_tree(&bbox[0], 0, 0,nbMailleS);//creating the search structure 
+    const double *bboxPtr=0;
+    if(nbMailleS>0)
+      bboxPtr=&bbox[0];
+    BBTree<SPACEDIM,ConnType> my_tree(bboxPtr, 0, 0,nbMailleS);//creating the search structure 
 
     long end_filtering=clock();