mirror of https://github.com/CGAL/cgal
remove a swap call for resizing a vector that is useless for a list
This commit is contained in:
parent
f724d4a704
commit
d62c514d18
|
|
@ -114,9 +114,6 @@ void run_mst_orient_normals(PointList& points, // input points + input/output no
|
|||
// if you plan to call a reconstruction algorithm that expects oriented normals.
|
||||
points.erase(unoriented_points_begin, points.end());
|
||||
|
||||
// Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
|
||||
PointList(points).swap(points);
|
||||
|
||||
long memory = CGAL::Memory_sizer().virtual_size();
|
||||
std::cerr << "done: " << task_timer.time() << " seconds, "
|
||||
<< (memory>>20) << " Mb allocated"
|
||||
|
|
|
|||
|
|
@ -52,9 +52,6 @@ int main(void)
|
|||
// if you plan to call a reconstruction algorithm that expects oriented normals.
|
||||
points.erase(unoriented_points_begin, points.end());
|
||||
|
||||
// Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity
|
||||
std::list<PointVectorPair>(points).swap(points);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue