mirror of https://github.com/CGAL/cgal
fix min/max problem
This commit is contained in:
parent
cd95c341da
commit
d87cf954ad
|
|
@ -571,8 +571,8 @@ public:
|
||||||
CGAL_KINETIC_LOG(CGAL::Kinetic::LOG_SOME, "DELAUNAY ERROR not flipping unflippable edge" << std::endl);
|
CGAL_KINETIC_LOG(CGAL::Kinetic::LOG_SOME, "DELAUNAY ERROR not flipping unflippable edge" << std::endl);
|
||||||
//make this better
|
//make this better
|
||||||
double ub=to_interval(traits_.simulator_handle()->next_event_time()).second;
|
double ub=to_interval(traits_.simulator_handle()->next_event_time()).second;
|
||||||
ub= std::max(ub+.0000001,
|
ub= (std::max)(ub+.0000001,
|
||||||
nextafter(ub, std::numeric_limits<double>::max()));
|
nextafter(ub, (std::numeric_limits<double>::max)()));
|
||||||
Time t=ub;
|
Time t=ub;
|
||||||
//cert.pop_failure_time();
|
//cert.pop_failure_time();
|
||||||
Event_key k =traits_.simulator_handle()->new_event(t, O2_event(cert, e, this));
|
Event_key k =traits_.simulator_handle()->new_event(t, O2_event(cert, e, this));
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class Delaunay_triangulation_cell_base_3: public Cell_base
|
||||||
CGAL_precondition(i!= j);
|
CGAL_precondition(i!= j);
|
||||||
//if (i <j) std::swap(i,j);
|
//if (i <j) std::swap(i,j);
|
||||||
unsigned int sum= i+j;
|
unsigned int sum= i+j;
|
||||||
if (std::max(i,j) != 3) --sum;
|
if ((std::max)(i,j) != 3) --sum;
|
||||||
CGAL_assertion( sum <6);
|
CGAL_assertion( sum <6);
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(kneighborsp.begin(), kneighborsp.end());
|
std::sort(kneighborsp.begin(), kneighborsp.end());
|
||||||
for (unsigned int i=0; i< std::max(neighborsp.size(), kneighborsp.size()); ++i) {
|
for (unsigned int i=0; i< (std::max)(neighborsp.size(), kneighborsp.size()); ++i) {
|
||||||
Point_key nr;
|
Point_key nr;
|
||||||
if (i < neighborsp.size()) nr= neighborsp[i];
|
if (i < neighborsp.size()) nr= neighborsp[i];
|
||||||
Point_key nk;
|
Point_key nk;
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ struct Two_list_event_queue_item_allocator
|
||||||
::operator delete(static_cast<void*>(p));
|
::operator delete(static_cast<void*>(p));
|
||||||
}
|
}
|
||||||
size_type max_size() const throw() {
|
size_type max_size() const throw() {
|
||||||
return std::numeric_limits<size_type>::max()/sizeof(dummy_value_type);
|
return (std::numeric_limits<size_type>::max)()/sizeof(dummy_value_type);
|
||||||
}
|
}
|
||||||
template <class TT>
|
template <class TT>
|
||||||
void construct(pointer p, const TT &) {
|
void construct(pointer p, const TT &) {
|
||||||
|
|
@ -318,7 +318,7 @@ public:
|
||||||
//if (end_time != std::numeric_limits<Priority>::infinity()){
|
//if (end_time != std::numeric_limits<Priority>::infinity()){
|
||||||
set_end_priority(end_time);
|
set_end_priority(end_time);
|
||||||
/*} else {
|
/*} else {
|
||||||
NT end=std::numeric_limits<int>::max();
|
NT end=(std::numeric_limits<int>::max)();
|
||||||
std::cerr << "WARNING Infinity is being rounded down to " << end << std::endl;
|
std::cerr << "WARNING Infinity is being rounded down to " << end << std::endl;
|
||||||
set_end_priority(end);
|
set_end_priority(end);
|
||||||
}*/
|
}*/
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ inline Rt infinity()
|
||||||
{
|
{
|
||||||
//BOOST_STATIC_ASSERT(std::numeric_limits<Rt>::is_specialized);
|
//BOOST_STATIC_ASSERT(std::numeric_limits<Rt>::is_specialized);
|
||||||
if (std::numeric_limits<Rt>::has_infinity) return std::numeric_limits<Rt>::infinity();
|
if (std::numeric_limits<Rt>::has_infinity) return std::numeric_limits<Rt>::infinity();
|
||||||
else return std::numeric_limits<Rt>::max();
|
else return (std::numeric_limits<Rt>::max)();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue