Fixes after cppcheck 12/86512/2
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Thu, 1 Sep 2016 12:43:38 +0000 (14:43 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 2 Sep 2016 09:29:06 +0000 (02:29 -0700)
> [app-installers/src/common/external_mount.cc:44]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

Change-Id: I4c3308a7d163987c158a4ff12a6c18770edd4212

src/common/external_mount.cc

index b9add82..7ed0b25 100644 (file)
@@ -41,7 +41,7 @@ bool ExternalMount::IsAvailable() const {
     LOG(WARNING) << "External storage (SD Card) is not mounted.";
     return false;
   }
-  std::string storage = QueryStorageForPkgId(pkgid_.c_str(), uid_);
+  std::string storage = QueryStorageForPkgId(pkgid_, uid_);
   if (storage != kInstalledExternally)
     return false;