[Bf-blender-cvs] [5705db5bb37] master: Fix: Compile error in field input

Hans Goudey noreply at git.blender.org
Mon Dec 6 21:47:16 CET 2021


Commit: 5705db5bb37604a208c0837e7815ce46f88a20d0
Author: Hans Goudey
Date:   Mon Dec 6 15:47:09 2021 -0500
Branches: master
https://developer.blender.org/rB5705db5bb37604a208c0837e7815ce46f88a20d0

Fix: Compile error in field input

Instead of essentially hashing a bool, just use a ternary operator.

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

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

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

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
index 95633d14270..473bef63e92 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
@@ -85,7 +85,7 @@ class EdgeVerticesFieldInput final : public GeometryFieldInput {
 
   uint64_t hash() const override
   {
-    return get_default_hash_2(vertex_, 9872922352ULL);
+    return vertex_ == VERTEX_ONE ? 23847562893465 : 92384598734567;
   }
 
   bool is_equal_to(const fn::FieldNode &other) const override
@@ -147,7 +147,7 @@ class EdgePositionFieldInput final : public GeometryFieldInput {
 
   uint64_t hash() const override
   {
-    return get_default_hash_2(vertex_, 2359867235ULL);
+    return vertex_ == VERTEX_ONE ? 987456978362 : 374587679866;
   }
 
   bool is_equal_to(const fn::FieldNode &other) const override



More information about the Bf-blender-cvs mailing list