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>2014-08-07 05:19:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-07 05:19:55 +0400
commit1b6864752f3e2ea8e425303a91216f7bb64b5345 (patch)
tree3b81f33019c728aab57c5db2f72bb048a30d6794 /source/blender/blenlib/intern/BLI_ghash.c
parentea30641d90119ff556599151f0a4bf3000574470 (diff)
GHash/EdgeHash: avoid NULL check on iterator init
Diffstat (limited to 'source/blender/blenlib/intern/BLI_ghash.c')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 6b818ed36cb..b209e6803f8 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -570,12 +570,12 @@ void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh)
ghi->curEntry = NULL;
ghi->curBucket = UINT_MAX; /* wraps to zero */
if (gh->nentries) {
- while (!ghi->curEntry) {
+ do {
ghi->curBucket++;
if (UNLIKELY(ghi->curBucket == ghi->gh->nbuckets))
break;
ghi->curEntry = ghi->gh->buckets[ghi->curBucket];
- }
+ } while (!ghi->curEntry);
}
}