summaryrefslogtreecommitdiff
path: root/adb/file_sync_client.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-27 16:25:51 -0700
committerChih-Hung Hsieh <chh@google.com>2016-08-01 11:55:42 -0700
commit8f7b9e3d39cdae8363816aa7bcbab0d79fd70cea (patch)
tree136c54668ea9515735fc14d1e71eb514c62f5a57 /adb/file_sync_client.cpp
parenteafeb75c492677550a62dfe19623fac8b7be0344 (diff)
Fix clang-tidy performance warnings in syste/core.
* Use const reference type for parameters to avoid unnecessary copy. * Suppress warning of not using faster overloaded string find function. Bug: 30407689 Bug: 30411878 Change-Id: I6cfdbbd50cf5e8f3db6e5263076d3a17a9a791ee Test: build with WITH_TIDY=1 Merged-In: Ie79dbe21899867bc62031f8618bb1322b8071525
Diffstat (limited to 'adb/file_sync_client.cpp')
-rw-r--r--adb/file_sync_client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/file_sync_client.cpp b/adb/file_sync_client.cpp
index 6a9e163715..fbca770f9e 100644
--- a/adb/file_sync_client.cpp
+++ b/adb/file_sync_client.cpp
@@ -433,7 +433,7 @@ class SyncConnection {
typedef void (sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char* name);
static bool sync_ls(SyncConnection& sc, const char* path,
- std::function<sync_ls_cb> func) {
+ const std::function<sync_ls_cb>& func) {
if (!sc.SendRequest(ID_LIST, path)) return false;
while (true) {