From a4eed3e3302bde1fcb20a740455d400e7436ad80 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sun, 2 Feb 2020 16:06:22 -0800
Subject: [PATCH] [clang-tidy] use forward instead of move

Found with bugprone-move-forwarding-reference

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 src/config/Data.cxx                           | 2 +-
 src/lib/dbus/UDisks2.cxx                      | 2 +-
 src/neighbor/plugins/UdisksNeighborPlugin.cxx | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/config/Data.cxx b/src/config/Data.cxx
index 0c84eeebe..479b8fa6b 100644
--- a/src/config/Data.cxx
+++ b/src/config/Data.cxx
@@ -50,7 +50,7 @@ template<typename T>
 static auto
 Append(std::forward_list<T> &list, T &&src)
 {
-	return list.emplace_after(FindLast(list), std::move(src));
+	return list.emplace_after(FindLast(list), std::forward<T>(src));
 }
 
 void
diff --git a/src/lib/dbus/UDisks2.cxx b/src/lib/dbus/UDisks2.cxx
index d07e5aabe..0b1fefd94 100644
--- a/src/lib/dbus/UDisks2.cxx
+++ b/src/lib/dbus/UDisks2.cxx
@@ -167,7 +167,7 @@ ParseObjects(ODBus::ReadMessageIter &&i,
 
 	ForEachInterface(std::move(i), [&callback](const char *path, auto &&j){
 			Object o(path);
-			ParseObject(o, std::move(j));
+			ParseObject(o, std::forward<decltype(j)>(j));
 			if (o.IsValid())
 				callback(std::move(o));
 		});
diff --git a/src/neighbor/plugins/UdisksNeighborPlugin.cxx b/src/neighbor/plugins/UdisksNeighborPlugin.cxx
index 9206048ed..820271d67 100644
--- a/src/neighbor/plugins/UdisksNeighborPlugin.cxx
+++ b/src/neighbor/plugins/UdisksNeighborPlugin.cxx
@@ -231,7 +231,7 @@ UdisksNeighborExplorer::HandleMessage(DBusConnection *, DBusMessage *message) no
 	    dbus_message_has_signature(message, InterfacesAddedType::value)) {
 		RecurseInterfaceDictEntry(ReadMessageIter(*message), [this](const char *path, auto &&i){
 				UDisks2::Object o(path);
-				UDisks2::ParseObject(o, std::move(i));
+				UDisks2::ParseObject(o, std::forward<decltype(i)>(i));
 				if (o.IsValid())
 					this->Insert(std::move(o));
 			});