[Bf-blender-cvs] [5213c1d] temp-ghash-basis: Remove BLI_ghash_add for now.

Bastien Montagne noreply at git.blender.org
Thu Mar 19 15:34:01 CET 2015


Commit: 5213c1d4e5291842f1455f5ec2f444e9092fec13
Author: Bastien Montagne
Date:   Thu Mar 19 15:32:35 2015 +0100
Branches: temp-ghash-basis
https://developer.blender.org/rB5213c1d4e5291842f1455f5ec2f444e9092fec13

Remove BLI_ghash_add for now.

Looks like it’s not enough consensual... :P

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

M	source/blender/blenlib/BLI_ghash.h
M	source/blender/blenlib/intern/BLI_ghash.c

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

diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 89bf5cf..4b84a31 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -73,7 +73,6 @@ GHash *BLI_ghash_copy(GHash *gh, GHashKeyCopyFP keycopyfp,
 void   BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
 void   BLI_ghash_reserve(GHash *gh, const unsigned int nentries_reserve);
 void   BLI_ghash_insert(GHash *gh, void *key, void *val);
-bool   BLI_ghash_add(GHash *gh, void *key, void *val);
 bool   BLI_ghash_reinsert(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
 void  *BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
 void  *BLI_ghash_lookup_default(GHash *gh, const void *key, void *val_default) ATTR_WARN_UNUSED_RESULT;
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index be2c296..0d01624 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -631,18 +631,6 @@ void BLI_ghash_insert(GHash *gh, void *key, void *val)
 }
 
 /**
- * Like #BLI_ghash_insert, but does nothing in case \a key is already in the \a gh.
- *
- * Avoids #BLI_ghash_haskey, #BLI_ghash_insert calls (double lookups)
- *
- * \returns true if a new key has been added.
- */
-bool BLI_ghash_add(GHash *gh, void *key, void *val)
-{
-	return ghash_insert_safe(gh, key, val, false, NULL, NULL);
-}
-
-/**
  * Inserts a new value to a key that may already be in ghash.
  *
  * Avoids #BLI_ghash_remove, #BLI_ghash_insert calls (double lookups)




More information about the Bf-blender-cvs mailing list