Smallhash: refactor and fixes
authorCampbell Barton <ideasman42@gmail.com>
Thu, 30 Jan 2014 09:51:44 +0000 (20:51 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 30 Jan 2014 10:10:55 +0000 (21:10 +1100)
commit1f64371ec036c2f6ab450e37ad5a9c1120f1c54f
treecf0d1a02880244407d25b267a8ce4920572f1454
parentab6157a06ab49fc1f78f1575d373c83037cd39b7
Smallhash: refactor and fixes

- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p
source/blender/blenlib/BLI_smallhash.h
source/blender/blenlib/intern/smallhash.c