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>2012-02-26 20:39:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-26 20:39:21 +0400
commit03f5758b48457b5d76239d78f3f374195d1104ab (patch)
treee245eb650e3794bf08e55dac38a3fb14a1ef8d51 /source/blender/bmesh/intern/bmesh_walkers.c
parent5970adaccfe4bd1faf24dd88fdba3e0801af792a (diff)
replace BMESH_ERROR with BMESH_ASSERT, most areas it was used are better suited to an assert anyway.
also tag all error cases as UNLIKELY() for better branch prediction.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_walkers.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index 4fe54bfaa01..d9163360717 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -88,12 +88,12 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type,
walker->visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers 1");
- if (type >= BMW_MAXWALKERS || type < 0) {
- BMESH_ERROR;
+ if (UNLIKELY(type >= BMW_MAXWALKERS || type < 0)) {
fprintf(stderr,
"Invalid walker type in BMW_init; type: %d, "
"searchmask: (v:%d, e:%d, l:%d, f:%d), flag: %d\n",
type, mask_vert, mask_edge, mask_loop, mask_face, layer);
+ BMESH_ASSERT(0);
}
if (type != BMW_CUSTOM) {