diff options
author | Chih-Hung Hsieh | 2019-02-28 15:44:07 -0600 |
---|---|---|
committer | Praneeth Bajjuri | 2019-02-28 10:03:23 -0600 |
commit | a7f07c840d7004b529acc77964cd030aa9b3247f (patch) | |
tree | d5d66fb4b5c26cc9f63a73d71b755aac12e51a96 | |
parent | 949450945115165cf76f47c69b3f107a4db022f1 (diff) | |
download | platform-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.cpp | 2 |
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); |