Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae692fb1 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

Avoid extra string creation

We're calling a function that takes a const reference to a
std::string.  When passing the result of c_str(), it forces
the creation of a new std::string object.  By directly passing
a const reference our already created std::string, we avoid this.

Test: TreeHugger
Bug: 196432585
Change-Id: I40bc8ebd0cf59452a59ae2a350ddb2542eb5b3b0
parent e741f50b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ status_t CameraProviderManager::tryToAddAidlProvidersLocked() {
                    __FUNCTION__);
            return res;
        }
        addAidlProviderLocked(aidlServiceName.c_str());
        addAidlProviderLocked(aidlServiceName);
    }
    return OK;
}