diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-06 19:13:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-06 19:16:21 +0300 |
commit | 9c6f33c40587a94ed65bd75c4428907f666ea8b2 (patch) | |
tree | c16797147139ea9f1e8fbf8c625592f0c5c7f011 /source/blender/blenkernel/intern/bvhutils.c | |
parent | 9f96976e597f165bc1de34fbc950519eb8074d36 (diff) |
Correct in-range assert (zero is valid)
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index e2831ae025a..bc45542ef9f 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -397,7 +397,7 @@ static BVHTree *bvhtree_from_editmesh_verts_create_tree( int i; BM_mesh_elem_table_ensure(em->bm, BM_VERT); if (verts_mask) { - BLI_assert(IN_RANGE(verts_num_active, 0, verts_num)); + BLI_assert(IN_RANGE(verts_num_active, -1, verts_num)); } else { verts_num_active = verts_num; @@ -430,7 +430,7 @@ static BVHTree *bvhtree_from_mesh_verts_create_tree( int i; if (vert) { if (verts_mask) { - BLI_assert(IN_RANGE(verts_num_active, 0, verts_num)); + BLI_assert(IN_RANGE(verts_num_active, -1, verts_num)); } else { verts_num_active = verts_num; @@ -688,7 +688,7 @@ static BVHTree *bvhtree_from_mesh_faces_create_tree( if (faces_num) { if (faces_mask) { - BLI_assert(IN_RANGE(faces_num_active, 0, faces_num)); + BLI_assert(IN_RANGE(faces_num_active, -1, faces_num)); } else { faces_num_active = faces_num; @@ -842,7 +842,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree( if (looptri_num) { if (looptri_mask) { - BLI_assert(IN_RANGE(looptri_num_active, 0, looptri_num)); + BLI_assert(IN_RANGE(looptri_num_active, -1, looptri_num)); } else { looptri_num_active = looptri_num; @@ -892,7 +892,7 @@ static BVHTree *bvhtree_from_mesh_looptri_create_tree( if (looptri_num) { if (looptri_mask) { - BLI_assert(IN_RANGE(looptri_num_active, 0, looptri_num)); + BLI_assert(IN_RANGE(looptri_num_active, -1, looptri_num)); } else { looptri_num_active = looptri_num; |