From 9f62a542757a9e032b601cb2f7f8759a86f6da2d Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 9 Mar 2010 15:34:15 +0000 Subject: [PATCH] Windows porting. --- src/INTERP_KERNEL/BBTree.txx | 11 +++++++++-- src/INTERP_KERNEL/InterpolationPlanar.txx | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/INTERP_KERNEL/BBTree.txx b/src/INTERP_KERNEL/BBTree.txx index 1e5c7d5cb..920bc75c4 100644 --- a/src/INTERP_KERNEL/BBTree.txx +++ b/src/INTERP_KERNEL/BBTree.txx @@ -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); } diff --git a/src/INTERP_KERNEL/InterpolationPlanar.txx b/src/INTERP_KERNEL/InterpolationPlanar.txx index 295360db4..04da66122 100644 --- a/src/INTERP_KERNEL/InterpolationPlanar.txx +++ b/src/INTERP_KERNEL/InterpolationPlanar.txx @@ -347,7 +347,10 @@ namespace INTERP_KERNEL std::vector bbox; intersector->createBoundingBoxes(myMeshS,bbox); // create the bounding boxes performAdjustmentOfBB(intersector,bbox); - BBTree my_tree(&bbox[0], 0, 0,nbMailleS);//creating the search structure + const double *bboxPtr=0; + if(nbMailleS>0) + bboxPtr=&bbox[0]; + BBTree my_tree(bboxPtr, 0, 0,nbMailleS);//creating the search structure long end_filtering=clock(); -- 2.39.2