Fix may-be-used-uninitialized warning

This commit is contained in:
Mael Rouxel-Labbé 2021-07-30 10:35:10 +02:00
parent 01323fa16e
commit 32b2354ac1
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()) {