OSDN Git Service

installd: Avoid extra std::string copy
authorGreg Kaiser <gkaiser@google.com>
Tue, 26 Mar 2019 15:55:32 +0000 (08:55 -0700)
committerGreg Kaiser <gkaiser@google.com>
Tue, 26 Mar 2019 16:28:23 +0000 (09:28 -0700)
commit6d758fc418b5cde2229980cf84cfa0ac772777f9
treea5ab1ac83239c2f4a124cf92dd5b2e30f02629b6
parent8042c37f15940479d9d89a97646555a01161a334
installd: Avoid extra std::string copy

The method is_valid_package_name() takes a const std::string
reference, so it's inefficient to pass a std::string::c_str().

Test: TreeHugger
Change-Id: Ic8b33ce8b6c664f960b5c84f688821e9f7eddf03
cmds/installd/InstalldNativeService.cpp