diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-24 17:47:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-24 17:47:57 +0400 |
commit | 0b88b4fad7427fa8f9b623660188ef1d5432801e (patch) | |
tree | f59b5d13fb2ffc4b2703cd4fa2bd5dd9b79af78d /source/blender/blenlib | |
parent | 17679aaa521e8f01e5c10af9b453d7513ee7b5d0 (diff) |
when the size of an edgehash is known or can be guessed,
pass in the argument to reserve the size.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_edgehash.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h index 80eac9199e3..55efa49b262 100644 --- a/source/blender/blenlib/BLI_edgehash.h +++ b/source/blender/blenlib/BLI_edgehash.h @@ -62,4 +62,8 @@ void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *v void BLI_edgehashIterator_step(EdgeHashIterator *ehi); bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi); +#define BLI_EDGEHASH_SIZE_GUESS_FROM_LOOPS(totloop) ((totloop) / 2) +#define BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly) ((totpoly) * 2) + + #endif |