diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-07-27 10:19:47 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2016-07-27 10:19:47 -0700 |
commit | 23abfd37a55f281186f9275ad35b7182efd2e8b6 (patch) | |
tree | bba862d8cd7b056082bdb8a067418d991190b86e /recovery-refresh.cpp | |
parent | a82ee456bbb2fdcd77b782d52500650bd06d04e9 (diff) |
Fix clang-tidy performance warnings.
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.
Bug: 30407689
Bug: 30411878
Change-Id: Iefab05c077367f272abf545036b853e8a295c8cd
Test: build with WITH_TIDY=1
Diffstat (limited to 'recovery-refresh.cpp')
-rw-r--r-- | recovery-refresh.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recovery-refresh.cpp b/recovery-refresh.cpp index 333367eb..b75c9153 100644 --- a/recovery-refresh.cpp +++ b/recovery-refresh.cpp @@ -76,7 +76,7 @@ static ssize_t logrotate( } std::string name(filename); - size_t dot = name.find_last_of("."); + size_t dot = name.find_last_of('.'); std::string sub = name.substr(0, dot); if (!strstr(LAST_KMSG_FILE, sub.c_str()) && |