[Bf-blender-cvs] [eeca637] master: Correct asserts

Campbell Barton noreply at git.blender.org
Fri May 13 19:58:22 CEST 2016


Commit: eeca6372d07683aa28ccc2224470d5f4238bd4b6
Author: Campbell Barton
Date:   Sat May 14 04:05:18 2016 +1000
Branches: master
https://developer.blender.org/rBeeca6372d07683aa28ccc2224470d5f4238bd4b6

Correct asserts

===================================================================

M	source/blender/blenkernel/intern/bvhutils.c

===================================================================

diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 88be732..7821946 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, -1, verts_num));
+		BLI_assert(IN_RANGE_INCL(verts_num_active, 0, 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, -1, verts_num));
+			BLI_assert(IN_RANGE_INCL(verts_num_active, 0, 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, -1, faces_num));
+			BLI_assert(IN_RANGE_INCL(faces_num_active, 0, 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, -1, looptri_num));
+			BLI_assert(IN_RANGE_INCL(looptri_num_active, 0, 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, -1, looptri_num));
+			BLI_assert(IN_RANGE_INCL(looptri_num_active, 0, looptri_num));
 		}
 		else {
 			looptri_num_active = looptri_num;




More information about the Bf-blender-cvs mailing list