Page MenuHome

Suppress clang warning in node_geometry_util.cc [-Wrange-loop-construct]
ClosedPublic

Authored by Stephan Seitz (theHamsta) on Feb 12 2021, 10:27 PM.

Details

Summary

This suppresses the following warning when compiling with clang-13

../source/blender/nodes/geometry/node_geometry_util.cc:41:28: warning: loop variable 'name' creates a copy from type 'const std::string' (aka 'const basic_string<char>') [-Wrange-loop-construct]
    for (const std::string name : component.attribute_names()) {
                           ^
../source/blender/nodes/geometry/node_geometry_util.cc:41:10: note: use reference type 'const std::string &' (aka 'const basic_string<char> &') to prevent copying
    for (const std::string name : component.attribute_names()) {

Diff Detail

Repository
rB Blender

Event Timeline

Stephan Seitz (theHamsta) requested review of this revision.Feb 12 2021, 10:27 PM
Stephan Seitz (theHamsta) created this revision.

Thanks, I'll commit this in a couple minutes

This revision is now accepted and ready to land.Feb 12 2021, 10:48 PM
This revision was automatically updated to reflect the committed changes.