summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-07-28 13:52:23 -0700
committerChih-Hung Hsieh <chh@google.com>2016-07-28 13:54:27 -0700
commit9c6f6b29325bb706ba3b2673a4b6d81d4daee378 (patch)
treec40b42b9932796387f21999c4d67c6ed8a6a30ea
parent39e701593e712adf6edfa029710dfb7af376ad4c (diff)
downloadtpm-9c6f6b29325bb706ba3b2673a4b6d81d4daee378.tar.gz
Fix clang-tidy performance warnings in system/tpm.
* Use const reference type for parameters to avoid unnecessary copy. Bug: 30407689 Change-Id: I6e6fbcf806eb6ebd4b984afc1d962fc3c1d69b00 Test: build with WITH_TIDY=1
-rw-r--r--trunks/background_command_transceiver.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/trunks/background_command_transceiver.cc b/trunks/background_command_transceiver.cc
index 51858ca..97255c3 100644
--- a/trunks/background_command_transceiver.cc
+++ b/trunks/background_command_transceiver.cc
@@ -37,7 +37,7 @@ void AssignAndSignal(std::string* destination,
// A callback which posts another |callback| to a given |task_runner|.
void PostCallbackToTaskRunner(
const trunks::CommandTransceiver::ResponseCallback& callback,
- scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
const std::string& response) {
base::Closure task = base::Bind(callback, response);
task_runner->PostTask(FROM_HERE, task);