mirror of https://github.com/CGAL/cgal
use std API
This commit is contained in:
parent
9526dc8661
commit
f8323e7df8
|
|
@ -368,7 +368,7 @@ public:
|
|||
result_type operator() (const argument_type& arg) const {
|
||||
CGAL_assertion(bool(_inner));
|
||||
CGAL_assertion(bool(_outer));
|
||||
return _outer.get()(_inner.get()(arg));
|
||||
return _outer.value()(_inner.value()(arg));
|
||||
}
|
||||
private:
|
||||
::std::optional<InnerFunctor> _inner;
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ private:
|
|||
low_bfi_ = CGAL::convert_to_bfi(this->low());
|
||||
|
||||
high_bfi_ = CGAL::convert_to_bfi(this->high());
|
||||
f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get());
|
||||
f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get());
|
||||
f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value());
|
||||
f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ private:
|
|||
}
|
||||
|
||||
m_bfi = CGAL::convert_to_bfi(m);
|
||||
f_m_bfi = f_bfi_.get().evaluate(m_bfi);
|
||||
f_m_bfi = f_bfi_.value().evaluate(m_bfi);
|
||||
|
||||
if(CGAL::zero_in(f_m_bfi)) {
|
||||
|
||||
|
|
@ -329,25 +329,25 @@ private:
|
|||
low_bfi_ = CGAL::convert_to_bfi(this->low());
|
||||
}
|
||||
if(! f_low_bfi_) {
|
||||
f_low_bfi_ = f_bfi_.get().evaluate(low_bfi_.get());
|
||||
f_low_bfi_ = f_bfi_.value().evaluate(low_bfi_.value());
|
||||
}
|
||||
if(! high_bfi_) {
|
||||
high_bfi_ = CGAL::convert_to_bfi(this->high());
|
||||
}
|
||||
if(! f_high_bfi_) {
|
||||
f_high_bfi_ = f_bfi_.get().evaluate(high_bfi_.get());
|
||||
f_high_bfi_ = f_bfi_.value().evaluate(high_bfi_.value());
|
||||
}
|
||||
Integer i;
|
||||
while(true) {
|
||||
|
||||
if(CGAL::zero_in(f_low_bfi_.get() - f_high_bfi_.get())) {
|
||||
if(CGAL::zero_in(f_low_bfi_.value() - f_high_bfi_.value())) {
|
||||
_set_prec(2*prec_);
|
||||
continue;
|
||||
}
|
||||
|
||||
BFI denom = f_low_bfi_.get()-f_high_bfi_.get();
|
||||
BFI denom = f_low_bfi_.value()-f_high_bfi_.value();
|
||||
|
||||
BFI z = f_low_bfi_.get() / denom;
|
||||
BFI z = f_low_bfi_.value() / denom;
|
||||
|
||||
std::pair<Integer, Integer> int_pair = _to_integer_interval(z,N);
|
||||
Integer i_low = int_pair.first;
|
||||
|
|
@ -458,7 +458,7 @@ protected:
|
|||
f_bfi_ = _convert_polynomial_to_bfi(this->polynomial());
|
||||
}
|
||||
|
||||
BFI eval = f_bfi_.get().evaluate(convert_to_bfi(m));
|
||||
BFI eval = f_bfi_.value().evaluate(convert_to_bfi(m));
|
||||
|
||||
CGAL::Sign s = CGAL::sign(CGAL::lower(eval));
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
|
|||
Td_map_item& left_v_item = td.locate(tr.left(),td_lt);
|
||||
CGAL_assertion(td_lt == TD::POINT);
|
||||
Halfedge_const_handle he;
|
||||
if (std::get<Td_active_vertex>(&left_v_item) != nullptr) {
|
||||
if (std::get_if<Td_active_vertex>(&left_v_item) != nullptr) {
|
||||
Td_active_vertex v(std::get<Td_active_vertex>(left_v_item));
|
||||
he = v.cw_he();
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
|
|||
Td_map_item& right_v_item = td.locate(tr.right(),td_lt);
|
||||
CGAL_assertion(td_lt == TD::POINT);
|
||||
Halfedge_const_handle he;
|
||||
if (std::get<Td_active_vertex>(&right_v_item)!= nullptr) {
|
||||
if (std::get_if<Td_active_vertex>(&right_v_item)!= nullptr) {
|
||||
Td_active_vertex v(std::get<Td_active_vertex>(right_v_item));
|
||||
he = v.cw_he();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3580,7 +3580,7 @@ public:
|
|||
// Verify the first intersection is an overlap, remove it, and
|
||||
// recursively call.
|
||||
const X_monotone_curve_2* xcv =
|
||||
std::get<X_monotone_curve_2>(&(intersections.front()));
|
||||
std::get_if<X_monotone_curve_2>(&(intersections.front()));
|
||||
if (! xcv) {
|
||||
CGAL_error_msg("The first intersection is not an overlap!");
|
||||
return SMALLER;
|
||||
|
|
|
|||
Loading…
Reference in New Issue