mirror of https://github.com/CGAL/cgal
call list::size() only once
This commit is contained in:
parent
95afd598bc
commit
faa063d065
|
|
@ -550,11 +550,11 @@ convex_hull_3(InputIterator first, InputIterator beyond,
|
||||||
|
|
||||||
// If the first and last point are equal the collinearity test some lines below will always be true.
|
// If the first and last point are equal the collinearity test some lines below will always be true.
|
||||||
Point_3_list points(first, beyond);
|
Point_3_list points(first, beyond);
|
||||||
while((points.size() > 1) && (points.front() == points.back())){
|
|
||||||
points.pop_back();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int size = points.size();
|
unsigned int size = points.size();
|
||||||
|
while((size > 1) && (points.front() == points.back())){
|
||||||
|
points.pop_back();
|
||||||
|
--size;
|
||||||
|
}
|
||||||
|
|
||||||
if ( size == 1 ) // 1 point
|
if ( size == 1 ) // 1 point
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue