deref it once

This commit is contained in:
Sébastien Loriot 2021-01-29 18:04:19 +01:00
parent fd28440927
commit e49fd1e732
3 changed files with 3 additions and 3 deletions

View File

@ -290,7 +290,7 @@ bounding_box_2(ForwardIterator f, ForwardIterator l, const Traits& t)
return rect(v(rect(*xmin, *ymin), 0), v(rect(*xmax, *ymax), 2));
} // bounding_box_2(f, l, t)
template < class ForwardIterator >
inline
inline
//typename std::iterator_traits< ForwardIterator >::value_type::R::Iso_rectangle_2
decltype(auto)
bounding_box_2(ForwardIterator f, ForwardIterator l)

View File

@ -22,7 +22,8 @@ ch_graham_anderson( InputIterator first, InputIterator beyond,
std::vector< Point_2 > V (first, beyond);
typename std::vector< Point_2 >::iterator it =
std::min_element(V.begin(), V.end(), Less_xy_2());
std::sort( V.begin(), V.end(), [it](const Point_2& p1, const Point_2& p2){return Less_rotate_ccw_2()(*it, p1, p2);} );
const Point_2 p = *it;
std::sort( V.begin(), V.end(), [&p](const Point_2& p1, const Point_2& p2){return Less_rotate_ccw_2()(p, p1, p2);} );
if ( *(V.begin()) != *(V.rbegin()) )
{
result = CGAL::ch_graham_andrew_scan( V.begin(), V.end(), result, ch_traits);

View File

@ -376,7 +376,6 @@ protected:
Op2 op2;
Op3 op3;
public:
Binary_compose_1(const Op1& x, const Op2& y, const Op3& z)
: op1(x), op2(y), op3(z) {}