Skip to content

Commit

Permalink
odb: preallocate output coords
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Gadfort <[email protected]>
  • Loading branch information
gadfort committed Aug 14, 2024
1 parent 762f2be commit 66854d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/odb/src/db/geom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Polygon Polygon::bloat(int margin) const
const BoostPolygon& polygon_out = output_polygons[0];

std::vector<odb::Point> new_coord;
new_coord.reserve(polygon_out.coords_.size());
for (const auto& pt : polygon_out.coords_) {
new_coord.emplace_back(pt.x(), pt.y());
}
Expand Down

0 comments on commit 66854d2

Please sign in to comment.