[Bf-blender-cvs] [1065b413edf] master: Cleanup: Fix clang compile warning

Stephan Seitz noreply at git.blender.org
Fri Feb 12 23:09:12 CET 2021


Commit: 1065b413edfa9c6022ff2ae8734fef7e5ac50804
Author: Stephan Seitz
Date:   Fri Feb 12 16:08:01 2021 -0600
Branches: master
https://developer.blender.org/rB1065b413edfa9c6022ff2ae8734fef7e5ac50804

Cleanup: Fix clang compile warning

Use a reference instead of copying the string.

Differential Revision: https://developer.blender.org/D10411

===================================================================

M	source/blender/nodes/geometry/node_geometry_util.cc

===================================================================

diff --git a/source/blender/nodes/geometry/node_geometry_util.cc b/source/blender/nodes/geometry/node_geometry_util.cc
index 3e30658e056..c0f8fbade49 100644
--- a/source/blender/nodes/geometry/node_geometry_util.cc
+++ b/source/blender/nodes/geometry/node_geometry_util.cc
@@ -38,7 +38,7 @@ void gather_attribute_info(Map<std::string, AttributeInfo> &attributes,
     }
     const GeometryComponent &component = *set.get_component_for_read(component_type);
 
-    for (const std::string name : component.attribute_names()) {
+    for (const std::string &name : component.attribute_names()) {
       if (ignored_attributes.contains(name)) {
         continue;
       }



More information about the Bf-blender-cvs mailing list