Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f53f2f9 authored by Venkatesh Srinivasan's avatar Venkatesh Srinivasan
Browse files

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
parent c9337298
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment