mirror of https://github.com/CGAL/cgal
reserve to speed up allocation
This commit is contained in:
parent
79affebe42
commit
21cf39655e
|
|
@ -402,6 +402,7 @@ public:
|
||||||
|
|
||||||
// iterate over primitives to get reference points on them
|
// iterate over primitives to get reference points on them
|
||||||
std::vector<Point_and_primitive_id> points;
|
std::vector<Point_and_primitive_id> points;
|
||||||
|
points.reserve(m_primitives.size());
|
||||||
typename Primitives::const_iterator it;
|
typename Primitives::const_iterator it;
|
||||||
for(it = m_primitives.begin(); it != m_primitives.end(); ++it)
|
for(it = m_primitives.begin(); it != m_primitives.end(); ++it)
|
||||||
points.push_back(Point_and_primitive_id(it->reference_point(), it->id()));
|
points.push_back(Point_and_primitive_id(it->reference_point(), it->id()));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue