From e8c071a976020421870a113c9b239b4dcdeff01f Mon Sep 17 00:00:00 2001 From: dmatetelki Date: Wed, 6 May 2015 15:16:26 +0200 Subject: [PATCH] No check needed when adding a new vertex, as unordered_map::insert won't do anything if key exists. --- lib/graph/graph.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/graph/graph.hpp b/lib/graph/graph.hpp index e512cb9..8a64bf6 100644 --- a/lib/graph/graph.hpp +++ b/lib/graph/graph.hpp @@ -179,9 +179,6 @@ inline Graph::Graph(std::initializer_list edge_list) template inline void Graph::addVertex(const_reference data) { - if (m_vertices.find(data) != m_vertices.end()) - return; - std::pair p(data, edge_container()); m_vertices.insert(p); }