diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-29 08:00:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-13 18:47:12 +0400 |
commit | 365ff6698700fb23c8bd9d0509c49df71180431e (patch) | |
tree | 9f94247268e14830338cd8fdb8bdbb2a26f78bc7 /source/blender/blenlib/intern/edgehash.c | |
parent | 8bd4b7361bb47d5ecaf005ef04ec58cdf73a3a48 (diff) |
GSet, GHash: Add BLI_gset_add, since its common to add members to a set
also rename BLI_edgeset_reinsert -> BLI_edgeset_add, in this case its the same.
Diffstat (limited to 'source/blender/blenlib/intern/edgehash.c')
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index 51a22cc46ab..173d2a5a590 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -588,9 +588,12 @@ void BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1) } /** - * Assign a new value to a key that may already be in edgehash. + * A version of BLI_edgeset_insert which checks first if the key is in the set. + * \returns true if a new key has been added. + * + * \note EdgeHash has no equivalent to this because typically the value would be different. */ -bool BLI_edgeset_reinsert(EdgeSet *es, unsigned int v0, unsigned int v1) +bool BLI_edgeset_add(EdgeSet *es, unsigned int v0, unsigned int v1) { unsigned int hash; EdgeEntry *e; |