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:
authorCampbell Barton <ideasman42@gmail.com>2013-08-18 04:36:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-18 04:36:04 +0400
commitfbb446dff620c0719fd77692a0d401203ef1e966 (patch)
treec95104990f0da56ad6c5cd1d5ca4fb1ac4f277e7 /source/blender/blenlib/BLI_edgehash.h
parent763bce4d64eeed978c6e84212da0f9c59ed32a4d (diff)
add assert for hashes if an existing element is ever inserted into a ghash/edgehash.
the outliner does this intentionally, so add a flag to allow this situation optionally.
Diffstat (limited to 'source/blender/blenlib/BLI_edgehash.h')
-rw-r--r--source/blender/blenlib/BLI_edgehash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index 9ece3afde37..5d945bb9efc 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -36,6 +36,10 @@ typedef struct EdgeHashIterator EdgeHashIterator;
typedef void (*EdgeHashFreeFP)(void *key);
+enum {
+ EDGEHASH_FLAG_ALLOW_DUPES = (1 << 0), /* only checked for in debug mode */
+};
+
EdgeHash *BLI_edgehash_new(void);
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp);
@@ -65,6 +69,9 @@ int BLI_edgehash_size(EdgeHash *eh);
/* Remove all edges from hash. */
void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
+void BLI_edgehash_flag_set(EdgeHash *eh, unsigned short flag);
+void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned short flag);
+
/***/
/**