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

Commit fc59d7e0 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.

frameworks/native/libs/shaders/shaders.cpp:321:21: error: loop variable
'uniform' creates a copy from type 'android::tonemap::ShaderUniform const'
[-Werror,-Wrange-loop-construct]
  321 |     for (const auto uniform : tonemap::getToneMapper()->generateSha
derSkSLUniforms(metadata)) {
      |                     ^
frameworks/native/libs/shaders/shaders.cpp:321:10: note: use reference type
'android::tonemap::ShaderUniform const &' to prevent copying
  321 |     for (const auto uniform : tonemap::getToneMapper()->generateSha
derSkSLUniforms(metadata)) {
      |          ^~~~~~~~~~~~~~~~~~~~
      |                     &

Bug: 153747076
Test: m & presubmits
Flag: EXEMPT refactor
Change-Id: Ic00ba2bb15ec46f033ce31346705bf723ccd23c4
parent 5ee94fff
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