From 6c083acf2aa05e312f4b11494b986455346ab452 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 27 Jul 2016 10:28:33 -0700 Subject: [PATCH] Fix clang-tidy performance warnings. * Use const reference parameter type to avoid unnecessary copy. Bug: 30407689 Change-Id: Iefab05c077367f272abf545036b853e8a295c8cd Test: build with WITH_TIDY=1 --- tools/atree/atree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/atree/atree.cpp b/tools/atree/atree.cpp index b134e013c8..7deca7e6a9 100644 --- a/tools/atree/atree.cpp +++ b/tools/atree/atree.cpp @@ -92,7 +92,7 @@ debug_printf(const char* format, ...) // Escape the filename so that it can be added to the makefile properly. static string -escape_filename(const string name) +escape_filename(const string& name) { ostringstream new_name; for (string::const_iterator iter = name.begin(); iter != name.end(); ++iter)