Skip to content
Snippets Groups Projects
Commit fc852b24 authored by Tom Fischer's avatar Tom Fischer Committed by Dmitry Yu. Naumov
Browse files

[GL] Modernize GEOObjects::addPolylineVec().

parent 95ecf82e
No related branches found
No related tags found
No related merge requests found
......@@ -154,18 +154,10 @@ void GEOObjects::addPolylineVec(
ply_names)
{
assert(lines);
for (auto it(lines->begin()); it != lines->end();)
{
if ((*it)->getNumberOfPoints() < 2)
{
auto it_erase(it);
it = lines->erase(it_erase);
}
else
{
++it;
}
}
auto lines_end = std::remove_if(
lines->begin(), lines->end(),
[](auto const* polyline) { return polyline->getNumberOfPoints() < 2; });
lines->erase(lines_end, lines->end());
if (lines->empty())
{
......
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