remove a swap call for resizing a vector that is useless for a list

This commit is contained in:
Sébastien Loriot 2013-03-26 09:46:55 +01:00
parent f724d4a704
commit d62c514d18
2 changed files with 0 additions and 6 deletions

View File

@ -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"

View File

@ -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;
}