Skip to content
Snippets Groups Projects
Commit 38a624f8 authored by Tom Fischer's avatar Tom Fischer
Browse files

[A/IO/Legacy] Use std::transform instead of raw loop.

parent 7886485b
No related branches found
No related tags found
No related merge requests found
......@@ -56,10 +56,9 @@ bool createSurface(GeoLib::Polyline const& ply,
auto polyline_points = std::make_unique<std::vector<GeoLib::Point*>>();
GeoLib::GEOObjects geo;
auto ply_points = ply.getPointsVec();
for (auto p : ply_points)
{
polyline_points->push_back(new GeoLib::Point(*p));
}
std::transform(ply_points.begin(), ply_points.end(),
std::back_inserter(*polyline_points),
[](auto const* p) { return new GeoLib::Point(*p); });
std::string ply_name = "temporary_polyline_name";
geo.addPointVec(std::move(polyline_points), ply_name);
auto polyline =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment