diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-09-17 15:18:57 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2018-09-17 15:18:57 -0700 |
commit | 42bf30651ba6632e04febaf1a059885c3daaf114 (patch) | |
tree | 7c20650321bc203435f1f71268368b647d48a831 /init/modalias_handler.cpp | |
parent | c2501fda600ea2067099c1de042e3db7acde74ee (diff) |
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
Diffstat (limited to 'init/modalias_handler.cpp')
-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 1e0db5731..c61c21039 100644 --- a/init/modalias_handler.cpp +++ b/init/modalias_handler.cpp @@ -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); |