Skip to content
Snippets Groups Projects
Commit 14c6654f authored by Jan Trávníček's avatar Jan Trávníček
Browse files

some clang-tidy fixes in graphs

parent 95edae90
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,7 @@ static Cut fordfulkerson_impl_dir(const DirectedGraph &graph, ...@@ -80,7 +80,7 @@ static Cut fordfulkerson_impl_dir(const DirectedGraph &graph,
} }
   
// cut are those edges, which lead from nodes reachable from source to nodes unreachable from source // cut are those edges, which lead from nodes reachable from source to nodes unreachable from source
for (std::pair<node::Node, node::Node> edge : candidates) { for (const std::pair<node::Node, node::Node> & edge : candidates) {
if ((state[edge.first] == 1 && state[edge.second] == 0) if ((state[edge.first] == 1 && state[edge.second] == 0)
|| (state[edge.first] == 0 && state[edge.second] == 1)) || (state[edge.first] == 0 && state[edge.second] == 1))
cut.insert(edge); cut.insert(edge);
...@@ -120,7 +120,7 @@ static Cut fordfulkerson_impl_undir(const UndirectedGraph &ugraph, ...@@ -120,7 +120,7 @@ static Cut fordfulkerson_impl_undir(const UndirectedGraph &ugraph,
} }
   
// cut are those edges, which lead from nodes reachable from source to nodes unreachable from source // cut are those edges, which lead from nodes reachable from source to nodes unreachable from source
for (std::pair<node::Node, node::Node> edge : candidates) { for (const std::pair<node::Node, node::Node> & edge : candidates) {
if ((state[edge.first] == 1 && state[edge.second] == 0) if ((state[edge.first] == 1 && state[edge.second] == 0)
|| (state[edge.first] == 0 && state[edge.second] == 1)) || (state[edge.first] == 0 && state[edge.second] == 1))
cut.insert(edge); cut.insert(edge);
......
...@@ -86,7 +86,7 @@ ext::pair<DefaultCoordinateType, DefaultCoordinateType> Normalize::normalizeObst ...@@ -86,7 +86,7 @@ ext::pair<DefaultCoordinateType, DefaultCoordinateType> Normalize::normalizeObst
TCoordinate> &&obstacle) { TCoordinate> &&obstacle) {
DefaultCoordinateType first = DefaultCoordinateType(obstacle.first); DefaultCoordinateType first = DefaultCoordinateType(obstacle.first);
DefaultCoordinateType second = DefaultCoordinateType(obstacle.second); DefaultCoordinateType second = DefaultCoordinateType(obstacle.second);
return ext::make_pair(std::move(first), std::move(second)); return ext::make_pair(first, second);
} }
   
// ===================================================================================================================== // =====================================================================================================================
......
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