clang-tidy: Enable performance-move-const-arg check
The check warns:
- if std::move() is called with a constant argument.
- if std::move() is called with an argument of a trivially-copyable
type.
- if the result of std::move() is passed as a const reference
argument.
In all three cases, the check will suggest a fix that removes the
std::move().
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ibaf1050b39bbcaddd27473c6f2009adbfb96125f
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index 6f24973..e7c9d5a 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -253,7 +253,7 @@
{
if (groupObj == nullptr)
{
- groupObj = std::move(group);
+ groupObj = group;
}
if (value)