summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2019-02-28 15:44:07 -0600
committerPraneeth Bajjuri2019-02-28 10:03:23 -0600
commita7f07c840d7004b529acc77964cd030aa9b3247f (patch)
treed5d66fb4b5c26cc9f63a73d71b755aac12e51a96
parent949450945115165cf76f47c69b3f107a4db022f1 (diff)
downloadplatform-system-core-d-pie-core-release.tar.gz
platform-system-core-d-pie-core-release.tar.xz
platform-system-core-d-pie-core-release.zip
Fix clang-tidy performance warnings in system/core.d-pie-core-release
* Use more efficient overloaded string methods. Bug: 30411878 Test: build with WITH_TIDY=1 Change-Id: I449347565f83fae14ea337d0b3173beb5a56e0ca
-rw-r--r--init/modalias_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/modalias_handler.cpp b/init/modalias_handler.cpp
index 1734a7e0f..fb4c7b486 100644
--- a/init/modalias_handler.cpp
+++ b/init/modalias_handler.cpp
@@ -50,7 +50,7 @@ Result<Success> ModaliasHandler::ParseDepCallback(std::vector<std::string>&& arg
50 } 50 }
51 51
52 // Key is striped module name to match names in alias file 52 // Key is striped module name to match names in alias file
53 std::size_t start = args[0].find_last_of("/"); 53 std::size_t start = args[0].find_last_of('/');
54 std::size_t end = args[0].find(".ko:"); 54 std::size_t end = args[0].find(".ko:");
55 if ((end - start) <= 1) return Error() << "malformed dependency line"; 55 if ((end - start) <= 1) return Error() << "malformed dependency line";
56 auto mod_name = args[0].substr(start + 1, (end - start) - 1); 56 auto mod_name = args[0].substr(start + 1, (end - start) - 1);