Merge pull request #5883 from MaelRL/BGL-Fix_warning-GF

Fix may-be-used-uninitialized warning
This commit is contained in:
Sebastien Loriot 2021-08-12 10:14:36 +02:00 committed by GitHub
commit 304786eddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ typedef std::vector<Point_2> Polyline_2;
// inserts a polyline into a graph
void insert(const std::vector<Point_2>& poly, Graph& graph, Point_vertex_map& pvmap)
{
vertex_descriptor u, v;
vertex_descriptor u = boost::graph_traits<Graph>::null_vertex();
vertex_descriptor v;
for (std::size_t i = 0; i < poly.size(); i++) {
// check if the point is not yet in the graph
if (pvmap.find(poly[i]) == pvmap.end()) {