Fix clang-tidy performance warnings in system/core.
* Use more efficient overloaded string methods. Bug: 30411878 Test: build with WITH_TIDY=1 Change-Id: I449347565f83fae14ea337d0b3173beb5a56e0ca
This commit is contained in:
parent
c2501fda60
commit
42bf30651b
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ Result<Success> ModaliasHandler::ParseDepCallback(std::vector<std::string>&& arg
|
|||
}
|
||||
|
||||
// Key is striped module name to match names in alias file
|
||||
std::size_t start = args[0].find_last_of("/");
|
||||
std::size_t start = args[0].find_last_of('/');
|
||||
std::size_t end = args[0].find(".ko:");
|
||||
if ((end - start) <= 1) return Error() << "malformed dependency line";
|
||||
auto mod_name = args[0].substr(start + 1, (end - start) - 1);
|
||||
|
|
Loading…
Reference in a new issue