clang-tidy: Enable performance-unnecessary-value-param check
This check flags value parameter declarations of expensive to copy
types that are copied for each invocation but it would suffice to
pass them by const reference.
Change-Id: I631deda63fcbb74362313c9596bf7e72933b0d0c
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/watch.cpp b/watch.cpp
index cabfd79..991bf48 100644
--- a/watch.cpp
+++ b/watch.cpp
@@ -28,7 +28,7 @@
namespace fs = std::filesystem;
Watch::Watch(sd_event* loop, std::function<int(std::string&)> imageCallback) :
- imageCallback(imageCallback)
+ imageCallback(std::move(imageCallback))
{
// Check if IMAGE DIR exists.
std::error_code ec;