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/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index 0429e7f..3d81cbb 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp
@@ -193,7 +193,7 @@ */ SurfaceMap surfaceMap; Vector<int32_t> outputStreamIds; - for (sp<Surface> surface : request.mSurfaceList) { + for (const sp<Surface>& surface : request.mSurfaceList) { if (surface == 0) continue; sp<IGraphicBufferProducer> gbp = surface->getIGraphicBufferProducer();