Fix clang-tidy performance warnings in system/security.
* Use const reference type for parameters, local variables,
and for-loop index variables to avoid unnecessary copy.
Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I3b9383f34e466ca6b5290bad802d535443fd0187
Test: build with WITH_TIDY=1
diff --git a/keystore/key_store_service.h b/keystore/key_store_service.h
index e744d1c..3efae47 100644
--- a/keystore/key_store_service.h
+++ b/keystore/key_store_service.h
@@ -205,7 +205,7 @@
* KM_ERROR_INVALID_OPERATION_HANDLE if token is not a valid
* operation token.
*/
- int32_t addOperationAuthTokenIfNeeded(sp<IBinder> token,
+ int32_t addOperationAuthTokenIfNeeded(const sp<IBinder>& token,
std::vector<keymaster_key_param_t>* params);
/**