commit | 48fc6191823ffa0708f60802fb6724c232760b9a | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Fri Aug 04 14:37:31 2017 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Fri Aug 04 14:58:41 2017 -0700 |
tree | c4b5ac89c6bb9798f20fa29b392306027003c4a2 | |
parent | b95106cabbe51d440505e5b97c55a3afebd49af9 [diff] [blame] |
Fix performance-for-range-copy warnings in frameworks/av. * Use const reference type for loop index variables to avoid unnecessary copy. Bug: 30413223 Test: build with WITH_TIDY=1 Change-Id: I79969be18569c5bb1ea29ee18ae89a3f9d55ce9c
diff --git a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp index 2ae5660..de7c869 100644 --- a/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp +++ b/services/camera/libcameraservice/device3/Camera3SharedOutputStream.cpp
@@ -200,7 +200,7 @@ // Called before shared buffer queue is constructed. *usage = getPresetConsumerUsage(); - for (auto surface : mSurfaces) { + for (const auto& surface : mSurfaces) { if (surface != nullptr) { res = getEndpointUsageForSurface(&u, surface); *usage |= u;