Use vector for edge queue

pull/3226/head
ζeh Matt 3 years ago
parent 0790af962e
commit 19df9c3d17
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0

@ -2113,7 +2113,7 @@ struct ConvexHull
}
// Gather connected vertices
std::deque<osg::Vec3d> unprocessedConnectedVertices(extremeVertices.begin(), extremeVertices.end());
VertexSet unprocessedConnectedVertices = extremeVertices;
VertexSet connectedVertices;
const auto containsVertex = [&](const auto& vert)
@ -2121,10 +2121,10 @@ struct ConvexHull
return std::find(connectedVertices.begin(), connectedVertices.end(), vert) != connectedVertices.end();
};
while (unprocessedConnectedVertices.size() > 0)
while (!unprocessedConnectedVertices.empty())
{
osg::Vec3d vertex = unprocessedConnectedVertices.front();
unprocessedConnectedVertices.pop_front();
osg::Vec3d vertex = unprocessedConnectedVertices.back();
unprocessedConnectedVertices.pop_back();
connectedVertices.emplace_back(vertex);
for (const Edge& edge : _edges)

Loading…
Cancel
Save