From 14c6654ffaa760d24a689ac7373ff47c4705e21d Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Fri, 7 Jun 2019 22:50:25 +0200
Subject: [PATCH] some clang-tidy fixes in graphs

---
 alib2graph_algo/src/minimum_cut/FordFulkerson.cpp | 4 ++--
 alib2graph_data/src/common/Normalize.hpp          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/alib2graph_algo/src/minimum_cut/FordFulkerson.cpp b/alib2graph_algo/src/minimum_cut/FordFulkerson.cpp
index 8d750e6cf6..ff177a02d0 100644
--- a/alib2graph_algo/src/minimum_cut/FordFulkerson.cpp
+++ b/alib2graph_algo/src/minimum_cut/FordFulkerson.cpp
@@ -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
-  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)
         || (state[edge.first] == 0 && state[edge.second] == 1))
       cut.insert(edge);
@@ -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
-  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)
         || (state[edge.first] == 0 && state[edge.second] == 1))
       cut.insert(edge);
diff --git a/alib2graph_data/src/common/Normalize.hpp b/alib2graph_data/src/common/Normalize.hpp
index 5fb96b810d..54da17b3ee 100644
--- a/alib2graph_data/src/common/Normalize.hpp
+++ b/alib2graph_data/src/common/Normalize.hpp
@@ -86,7 +86,7 @@ ext::pair<DefaultCoordinateType, DefaultCoordinateType> Normalize::normalizeObst
                                                                                                TCoordinate> &&obstacle) {
   DefaultCoordinateType first = DefaultCoordinateType(obstacle.first);
   DefaultCoordinateType second = DefaultCoordinateType(obstacle.second);
-  return ext::make_pair(std::move(first), std::move(second));
+  return ext::make_pair(first, second);
 }
 
 // =====================================================================================================================
-- 
GitLab