From faa063d06568b1e9d2603c49f95ec082f1cc1ff4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 3 Sep 2009 13:58:12 +0000 Subject: [PATCH] call list::size() only once --- Convex_hull_3/include/CGAL/convex_hull_3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index d1ed0b711ea..69b979cc712 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -550,12 +550,12 @@ 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. Point_3_list points(first, beyond); - while((points.size() > 1) && (points.front() == points.back())){ + unsigned int size = points.size(); + while((size > 1) && (points.front() == points.back())){ points.pop_back(); + --size; } - unsigned int size = points.size(); - if ( size == 1 ) // 1 point { ch_object = make_object(*points.begin());