Prevent COPY_INSTEAD_OF_MOVE 22/307322/1
authorYonggoo Kang <ygace.kang@samsung.com>
Thu, 7 Mar 2024 07:41:21 +0000 (16:41 +0900)
committerYonggoo Kang <ygace.kang@samsung.com>
Thu, 7 Mar 2024 07:41:21 +0000 (16:41 +0900)
Change-Id: I95bd05dc4c1362f6d7f4c64a002e9de93353f1bb

srcs/client/client.cpp
srcs/server/dl-loader.cpp

index 24f0f3b..2ce5926 100644 (file)
@@ -71,7 +71,7 @@ int wauthn_process(const wauthn_client_data_s *client_data,
         LogDebug("Response: " << wauthn_error_to_string(request->getStatus()));
 
         typename T::PubKeyCred *cred = NULL;
-        std::thread worker([request, callbacks, cred]{cb_worker(request, callbacks, cred);});
+        std::thread worker([request, callbacks, cred]{cb_worker(std::move(request), callbacks, cred);});
         worker.detach();
         return WAUTHN_ERROR_NONE;
     });
index 1ca33c0..0ab354b 100644 (file)
@@ -23,7 +23,7 @@
 #include <dlfcn.h>
 
 namespace WA {
-    DLLoader::DLLoader(std::string path) : m_libraryPath(path)
+    DLLoader::DLLoader(std::string path) : m_libraryPath(std::move(path))
     {
         LogDebug("Loading library: " << m_libraryPath);
         m_libraryHandle = dlopen(m_libraryPath.c_str(), RTLD_LAZY | RTLD_LOCAL);