[Bf-blender-cvs] [0718c6fae00] master: Cleanup: fix clang tidy warning

Jacques Lucke noreply at git.blender.org
Mon Jul 13 10:40:13 CEST 2020


Commit: 0718c6fae002a37b7448bf4b5841d08de114050e
Author: Jacques Lucke
Date:   Mon Jul 13 10:40:05 2020 +0200
Branches: master
https://developer.blender.org/rB0718c6fae002a37b7448bf4b5841d08de114050e

Cleanup: fix clang tidy warning

The code was actually correct, but clang tidy complaint about
using the Vector after it was moved from.

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

M	source/blender/functions/intern/multi_function_network_optimization.cc

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

diff --git a/source/blender/functions/intern/multi_function_network_optimization.cc b/source/blender/functions/intern/multi_function_network_optimization.cc
index 4fe0b506df8..849b24a318f 100644
--- a/source/blender/functions/intern/multi_function_network_optimization.cc
+++ b/source/blender/functions/intern/multi_function_network_optimization.cc
@@ -454,8 +454,9 @@ static void relink_duplicate_nodes(MFNetwork &network,
     }
 
     Vector<MFNode *, 16> nodes_to_check = nodes_with_same_hash;
-    Vector<MFNode *, 16> remaining_nodes;
     while (nodes_to_check.size() >= 2) {
+      Vector<MFNode *, 16> remaining_nodes;
+
       MFNode &deduplicated_node = *nodes_to_check[0];
       for (MFNode *node : nodes_to_check.as_span().drop_front(1)) {
         /* This is true with fairly high probability, but hash collisions can happen. So we have to



More information about the Bf-blender-cvs mailing list