Fix static analysis issue
[platform/core/appfw/app-installers.git] / src / common / pkgmgr_signal.cc
index acb2a92..78d41aa 100644 (file)
@@ -81,7 +81,7 @@ bool PkgmgrSignal::SendStarted(
   if (!SendSignal(PKGMGR_INSTALLER_START_KEY_STR, key->second, type, pkgid))
     return false;
 
-  for (auto l : user_list_) {
+  for (const auto& l : user_list_) {
     key = kEventStr.find(l.second);
     if (key == kEventStr.end())
       continue;
@@ -132,7 +132,7 @@ bool PkgmgrSignal::SendFinished(
         std::to_string(static_cast<int>(result)).c_str(), type, pkgid))
       return false;
 
-    for (auto l : user_list_)
+    for (const auto& l : user_list_)
       SendSignal(l.first,
           PKGMGR_INSTALLER_ERROR_KEY_STR,
           std::to_string(static_cast<int>(result)).c_str(), type, pkgid);