Merge pull request #6485 from sloriot/SS-use_member_kernel

do not use default constructed kernel
This commit is contained in:
Laurent Rineau 2022-04-12 16:34:33 +02:00
commit 9cd8ca6be2
1 changed files with 10 additions and 12 deletions

View File

@ -123,22 +123,20 @@ public:
void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
{
//Bbox_2 box=bbox_2(begin, end); BUG: WE NEED TO FIX THIS
K k;
double xmin=to_double(k.compute_x_2_object()(*begin)),
ymin=to_double(k.compute_y_2_object()(*begin)),
double xmin=to_double(_k.compute_x_2_object()(*begin)),
ymin=to_double(_k.compute_y_2_object()(*begin)),
xmax=xmin,
ymax=ymin;
for(RandomAccessIterator it=begin+1; it<end; ++it){
if ( to_double(k.compute_x_2_object()(*it)) < xmin)
xmin = to_double(k.compute_x_2_object()(*it));
if ( to_double(k.compute_y_2_object()(*it)) < ymin)
ymin = to_double(k.compute_y_2_object()(*it));
if ( to_double(k.compute_x_2_object()(*it)) > xmax)
xmax = to_double(k.compute_x_2_object()(*it));
if ( to_double(k.compute_y_2_object()(*it)) > ymax)
ymax = to_double(k.compute_y_2_object()(*it));
if ( to_double(_k.compute_x_2_object()(*it)) < xmin)
xmin = to_double(_k.compute_x_2_object()(*it));
if ( to_double(_k.compute_y_2_object()(*it)) < ymin)
ymin = to_double(_k.compute_y_2_object()(*it));
if ( to_double(_k.compute_x_2_object()(*it)) > xmax)
xmax = to_double(_k.compute_x_2_object()(*it));
if ( to_double(_k.compute_y_2_object()(*it)) > ymax)
ymax = to_double(_k.compute_y_2_object()(*it));
}
sort <0, false, false> (begin, end, xmin, ymin, xmax, ymax);