diff options
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh_bmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_bmesh.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 0ea554cf89d..7c4b687d412 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -225,7 +225,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index) } /* Recursively split the node if it exceeds the leaf_limit */ -static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) +static bool pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) { GHash *prim_bbc; GHash *bm_faces; @@ -238,7 +238,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) bm_faces_size = BLI_ghash_size(bm_faces); if (bm_faces_size <= bvh->leaf_limit) { /* Node limit not exceeded */ - return FALSE; + return false; } /* For each BMFace, store the AABB and AABB centroid */ @@ -266,7 +266,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) BLI_ghash_free(prim_bbc, NULL, NULL); MEM_freeN(bbc_array); - return TRUE; + return true; } /**********************************************************************/ @@ -765,10 +765,10 @@ static void pbvh_bmesh_split_edge(EdgeQueueContext *eq_ctx, PBVH *bvh, BM_edge_kill(bvh->bm, e); } -static int pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, - BLI_Buffer *edge_loops) +static bool pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, + BLI_Buffer *edge_loops) { - int any_subdivided = FALSE; + bool any_subdivided = false; while (!BLI_heap_is_empty(eq_ctx->q->heap)) { BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap); @@ -796,7 +796,7 @@ static int pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, if (BM_edge_calc_length_squared(e) <= eq_ctx->q->limit_len_squared) continue; - any_subdivided = TRUE; + any_subdivided = true; pbvh_bmesh_split_edge(eq_ctx, bvh, e, edge_loops); } @@ -940,14 +940,14 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1, BM_vert_kill(bvh->bm, v2); } -static int pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, - PBVH *bvh, - BLI_Buffer *edge_loops, - BLI_Buffer *deleted_faces) +static bool pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, + PBVH *bvh, + BLI_Buffer *edge_loops, + BLI_Buffer *deleted_faces) { float min_len_squared = bvh->bm_min_edge_len * bvh->bm_min_edge_len; GHash *deleted_verts; - int any_collapsed = FALSE; + bool any_collapsed = false; deleted_verts = BLI_ghash_ptr_new("deleted_verts"); @@ -982,7 +982,7 @@ static int pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, if (BM_edge_calc_length_squared(e) >= min_len_squared) continue; - any_collapsed = TRUE; + any_collapsed = true; pbvh_bmesh_collapse_edge(bvh, e, v1, v2, deleted_verts, edge_loops, @@ -1523,7 +1523,7 @@ void pbvh_bmesh_verify(PBVH *bvh) void *nip = BLI_ghashIterator_getValue(&gh_iter); int ni = GET_INT_FROM_POINTER(nip); PBVHNode *n = &bvh->nodes[ni]; - int found; + bool found; /* Check that the vert's node is a leaf */ BLI_assert(n->flag & PBVH_Leaf); @@ -1538,7 +1538,7 @@ void pbvh_bmesh_verify(PBVH *bvh) * adjacent faces */ BM_ITER_ELEM (f, &bm_iter, v, BM_FACES_OF_VERT) { if (BLI_ghash_lookup(bvh->bm_face_to_node, f) == nip) { - found = TRUE; + found = true; break; } } |