Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: Ia63c695575d2602ff7e67db874d423b99f4daeef
diff --git a/services/oboeservice/AAudioEndpointManager.cpp b/services/oboeservice/AAudioEndpointManager.cpp
index 04fee13..e0db261 100644
--- a/services/oboeservice/AAudioEndpointManager.cpp
+++ b/services/oboeservice/AAudioEndpointManager.cpp
@@ -108,7 +108,7 @@
const AAudioStreamConfiguration &configuration) {
sp<AAudioServiceEndpoint> endpoint;
mExclusiveSearchCount++;
- for (const auto ep : mExclusiveStreams) {
+ for (const auto& ep : mExclusiveStreams) {
if (ep->matches(configuration)) {
mExclusiveFoundCount++;
endpoint = ep;
@@ -126,7 +126,7 @@
const AAudioStreamConfiguration &configuration) {
sp<AAudioServiceEndpointShared> endpoint;
mSharedSearchCount++;
- for (const auto ep : mSharedStreams) {
+ for (const auto& ep : mSharedStreams) {
if (ep->matches(configuration)) {
mSharedFoundCount++;
endpoint = ep;