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-04-01 04:34:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-01 08:22:28 +0400
commit617557b08ea94e2b65a1697ddf0b79651204d92b (patch)
tree50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/blenkernel/intern/pbvh_bmesh.c
parent2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff)
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh_bmesh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c30
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;
}
}