Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/depsgraph/intern/node/deg_node_component.cc')
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_component.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_component.cc b/source/blender/depsgraph/intern/node/deg_node_component.cc
index f4d042fecf9..e75b5a96480 100644
--- a/source/blender/depsgraph/intern/node/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_component.cc
@@ -26,6 +26,8 @@
#include <cstring> /* required for STREQ later on. */
#include <stdio.h>
+#include "BLI_ghash.h"
+#include "BLI_hash.hh"
#include "BLI_utildefines.h"
#include "DNA_object_types.h"
@@ -69,6 +71,15 @@ bool ComponentNode::OperationIDKey::operator==(const OperationIDKey &other) cons
return (opcode == other.opcode) && (STREQ(name, other.name)) && (name_tag == other.name_tag);
}
+uint32_t ComponentNode::OperationIDKey::hash() const
+{
+ const int opcode_as_int = static_cast<int>(opcode);
+ return BLI_ghashutil_combine_hash(
+ name_tag,
+ BLI_ghashutil_combine_hash(BLI_ghashutil_uinthash(opcode_as_int),
+ BLI_ghashutil_strhash_p(name)));
+}
+
ComponentNode::ComponentNode()
: entry_operation(nullptr), exit_operation(nullptr), affects_directly_visible(false)
{