From a7241d09cdd204a63e10a6e53c575f36639a3102 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Apr 2014 14:17:54 +1000 Subject: GHash: add typed hash functions (were all (void *)) - BLI_ghashutil_strhash_n takes string length, to avoid terminating the string before hashing. - BLI_ghashutil_inthash/uinthash take ints, to avoid casting to (void *) This also showed up incorrect use of inthash, which was using a pointer. --- source/blender/blenkernel/intern/node.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/node.c') diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 47ef03093b1..a99d1303b85 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3591,9 +3591,9 @@ static void registerTextureNodes(void) void init_nodesystem(void) { - nodetreetypes_hash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "nodetreetypes_hash gh"); - nodetypes_hash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "nodetypes_hash gh"); - nodesockettypes_hash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "nodesockettypes_hash gh"); + nodetreetypes_hash = BLI_ghash_str_new("nodetreetypes_hash gh"); + nodetypes_hash = BLI_ghash_str_new("nodetypes_hash gh"); + nodesockettypes_hash = BLI_ghash_str_new("nodesockettypes_hash gh"); register_undefined_types(); -- cgit v1.2.3