Fix static analysis issue 80/297280/1
authorilho kim <ilho159.kim@samsung.com>
Wed, 16 Aug 2023 06:55:38 +0000 (15:55 +0900)
committerilho kim <ilho159.kim@samsung.com>
Wed, 16 Aug 2023 06:55:38 +0000 (15:55 +0900)
Remove of unnecessary copy operation of auto

Change-Id: I4ebb88e0c3b32597154ffa3f1df7af51cb5a6ee6
Signed-off-by: ilho kim <ilho159.kim@samsung.com>
src/unified/unified_installer_factory.cc

index cebdbfd..627d8b9 100644 (file)
@@ -63,7 +63,7 @@ std::string GetPkgTypeFromPath(const std::string& path) {
     LOG(ERROR) << "Failed to open zip file: " << path;
     return type;
   }
-  for (auto it : kTypeMap) {
+  for (const auto& it : kTypeMap) {
     if (unzLocateFile(uf, it.first, 0) == UNZ_OK) {
       LOG(DEBUG) << "Found: " << it.first;
       type = it.second;