Fix -Wrange-loop-construct warning
Fixing these warnings either by adding a reference to the loop index's
type or removing the reference from it.
The following is a sample warning (from a different project):
vendor/google/services/LyricCameraHAL/src/lyric/drivers/ois/lc898129dp/
ois_driver.cc:1920:30: error: loop variable 'htc_update_params' creates a
copy from type 'const HtcUpdateParams' [-Werror,-Wrange-loop-construct]
1920 | for (const HtcUpdateParams htc_update_params : *htc_update_
params_) {
| ^
vendor/google/services/LyricCameraHAL/src/lyric/drivers/ois/lc898129dp/
ois_driver.cc:1920:8: note: use reference type 'const HtcUpdateParams &'
to prevent copying
1920 | for (const HtcUpdateParams htc_update_params : *htc_update_
params_) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| &
Bug: 153747076
Test: m & presubmits
Flag: EXEMPT refactor
Change-Id: I4b9b7b630e0b68b0f2c5e88d94860ae9e2baf2b5
Loading
Please register or sign in to comment