Fix static analysis issue 68/297268/1
authorilho kim <ilho159.kim@samsung.com>
Wed, 16 Aug 2023 05:55:30 +0000 (14:55 +0900)
committerilho kim <ilho159.kim@samsung.com>
Wed, 16 Aug 2023 05:55:30 +0000 (14:55 +0900)
Remove of unnecessary copy operation of shared_ptr

Change-Id: I2213ed9e69fbf59813cc6576c1d1c3297cdfad3a
Signed-off-by: ilho kim <ilho159.kim@samsung.com>
src/pkg_upgrade/include/logging.hh

index 6ed63bc..fb0ba13 100644 (file)
@@ -127,7 +127,7 @@ class LogCore {
   }
 
   void Log(LogLevel level, const std::string& tag, const std::string& log) {
-    for (auto backend : backend_list_)
+    for (auto& backend : backend_list_)
       backend->WriteLog(level, tag, log);
   }