summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2020-11-13 17:16:48 +0900
committer Jiyong Park <jiyong@google.com> 2020-11-16 19:43:52 +0900
commit384328e986dd3684b00fd5d6bfd04a3de77a2c2e (patch)
tree25b254be1c5dc259125aecbef223a35d0a10e6bb
parent270193009fc7ed37cd95b672a2a22b83957bb006 (diff)
binder: fix performance-unnecessary-value-param
Bug: 162909698 Test: m libbinder Change-Id: I91afd69d482984138a52dda39bc68056d62a442e
-rw-r--r--libs/binder/Android.bp1
-rw-r--r--libs/binder/IPCThreadState.cpp2
-rw-r--r--libs/binder/include/binder/IPCThreadState.h2
3 files changed, 2 insertions, 3 deletions
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index d4cc907bde..f4060a292c 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -184,7 +184,6 @@ cc_library {
"-google-default-arguments",
"-google-explicit-constructor",
"-google-runtime-int",
- "-performance-unnecessary-value-param",
],
}
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 28ce935be1..c5835c614a 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -1077,7 +1077,7 @@ status_t IPCThreadState::writeTransactionData(int32_t cmd, uint32_t binderFlags,
sp<BBinder> the_context_object;
-void IPCThreadState::setTheContextObject(sp<BBinder> obj)
+void IPCThreadState::setTheContextObject(const sp<BBinder>& obj)
{
the_context_object = obj;
}
diff --git a/libs/binder/include/binder/IPCThreadState.h b/libs/binder/include/binder/IPCThreadState.h
index 418ac353c9..4da8aa1dfe 100644
--- a/libs/binder/include/binder/IPCThreadState.h
+++ b/libs/binder/include/binder/IPCThreadState.h
@@ -146,7 +146,7 @@ public:
void blockUntilThreadAvailable();
// Service manager registration
- void setTheContextObject(sp<BBinder> obj);
+ void setTheContextObject(const sp<BBinder>& obj);
// WARNING: DO NOT USE THIS API
//