diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
commit | 600a627f6e326f4542a876e6e82f771cd3da218f (patch) | |
tree | 9df2dd448e8da7b885d8cf8e56645a062f6d842c /source/blender/editors/mesh | |
parent | 04fe37f93116bd3b276ebe86d9fa53f18223ee6a (diff) |
Cleanup: use abbreviated names for unsigned types in editors
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_intersect.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 10 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_mirror.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 16 |
8 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 3d20b58b905..b303c4c7e4e 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -190,7 +190,7 @@ void paintface_reveal(bContext *C, Object *ob, const bool select) /* Set tface seams based on edge data, uses hash table to find seam edges. */ -static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index, const bool select) +static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bool select) { MPoly *mp; MLoop *ml; @@ -201,7 +201,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index, BLI_bitmap *edge_tag = BLI_BITMAP_NEW(me->totedge, __func__); BLI_bitmap *poly_tag = BLI_BITMAP_NEW(me->totpoly, __func__); - if (index != (unsigned int)-1) { + if (index != (uint)-1) { /* only put face under cursor in array */ mp = &me->mpoly[index]; BKE_mesh_poly_edgebitmap_insert(edge_tag, mp, me->mloop + mp->loopstart); @@ -267,7 +267,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index, void paintface_select_linked(bContext *C, Object *ob, const int mval[2], const bool select) { Mesh *me; - unsigned int index = (unsigned int)-1; + uint index = (uint)-1; me = BKE_mesh_from_object(ob); if (me == NULL || me->totpoly == 0) { diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c index 7718a07a55e..0c37a2604d9 100644 --- a/source/blender/editors/mesh/editmesh_intersect.c +++ b/source/blender/editors/mesh/editmesh_intersect.c @@ -479,7 +479,7 @@ static bool bm_vert_in_faces_radial(BMVert *v, BMEdge *e_radial, BMFace *f_ignor struct LinkBase { LinkNode *list; - unsigned int list_len; + uint list_len; }; static void ghash_insert_face_edge_link(GHash *gh, @@ -535,7 +535,7 @@ static void bm_face_split_by_edges_island_connect( } { - unsigned int edge_arr_holes_len; + uint edge_arr_holes_len; BMEdge **edge_arr_holes; if (BM_face_split_edgenet_connect_islands(bm, f, @@ -765,7 +765,7 @@ static int edbm_face_split_by_edges_exec(bContext *C, wmOperator *UNUSED(op)) BMIter liter; BMLoop *l; - unsigned int loop_stack_len; + uint loop_stack_len; BMLoop *l_best = NULL; BLI_assert(BLI_SMALLSTACK_IS_EMPTY(loop_stack)); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 373dfc811ec..fd92d864a28 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1579,7 +1579,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd) float line_tol, line_tol_sq; float face_tol, face_tol_sq; int isect_kind; - unsigned int tot; + uint tot; int i; const bool use_hit_prev = true; const bool use_hit_curr = (kcd->is_drag_hold == false); @@ -2419,7 +2419,7 @@ static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfe edge_array_len = i; #ifdef USE_NET_ISLAND_CONNECT - unsigned int edge_array_holes_len; + uint edge_array_holes_len; BMEdge **edge_array_holes; if (BM_face_split_edgenet_connect_islands(bm, f, diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index a1ea6074044..5d9923c6a7d 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -402,7 +402,7 @@ static UnorderedLoopPair *edbm_tagged_loop_pairs_to_fill(BMesh *bm) BMIter iter; BMEdge *e; - unsigned int total_tag = 0; + uint total_tag = 0; /* count tags, could be pre-calculated */ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(e, BM_ELEM_TAG)) { @@ -441,8 +441,8 @@ static UnorderedLoopPair *edbm_tagged_loop_pairs_to_fill(BMesh *bm) static void edbm_tagged_loop_pairs_do_fill_faces(BMesh *bm, UnorderedLoopPair *uloop_pairs) { UnorderedLoopPair *ulp; - unsigned int total_tag = MEM_allocN_len(uloop_pairs) / sizeof(UnorderedLoopPair); - unsigned int i; + uint total_tag = MEM_allocN_len(uloop_pairs) / sizeof(UnorderedLoopPair); + uint i; for (i = 0, ulp = uloop_pairs; i < total_tag; i++, ulp++) { if ((ulp->l_pair[0] && ulp->l_pair[1]) && (ulp->l_pair[0]->e != ulp->l_pair[1]->e)) { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 58e10764145..b9ac24e1d03 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -756,7 +756,7 @@ static bool edbm_add_edge_face__smooth_get(BMesh *bm) BMEdge *e; BMIter iter; - unsigned int vote_on_smooth[2] = {0, 0}; + uint vote_on_smooth[2] = {0, 0}; BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(e, BM_ELEM_SELECT) && e->l) { @@ -6122,7 +6122,7 @@ static void sort_bmelem_flag(bContext *C, const int flag, const int action, const int reverse, - const unsigned int seed) + const uint seed) { BMEditMesh *em = BKE_editmesh_from_object(ob); @@ -6135,7 +6135,7 @@ static void sort_bmelem_flag(bContext *C, /* Just to mark protected elements. */ char *pblock[3] = {NULL, NULL, NULL}, *pb; BMElemSort *sblock[3] = {NULL, NULL, NULL}, *sb; - unsigned int *map[3] = {NULL, NULL, NULL}, *mp; + uint *map[3] = {NULL, NULL, NULL}, *mp; int totelem[3] = {0, 0, 0}; int affected[3] = {0, 0, 0}; int i, j; @@ -6312,7 +6312,7 @@ static void sort_bmelem_flag(bContext *C, } else if (action == SRT_SELECTED) { - unsigned int *tbuf[3] = {NULL, NULL, NULL}, *tb; + uint *tbuf[3] = {NULL, NULL, NULL}, *tb; if (totelem[0]) { tb = tbuf[0] = MEM_callocN(sizeof(int) * totelem[0], "sort_bmelem vert tbuf"); @@ -6576,7 +6576,7 @@ static int edbm_sort_elements_exec(bContext *C, wmOperator *op) const int action = RNA_enum_get(op->ptr, "type"); PropertyRNA *prop_elem_types = RNA_struct_find_property(op->ptr, "elements"); const bool use_reverse = RNA_boolean_get(op->ptr, "reverse"); - unsigned int seed = RNA_int_get(op->ptr, "seed"); + uint seed = RNA_int_get(op->ptr, "seed"); int elem_types = 0; if (ELEM(action, SRT_VIEW_ZAXIS, SRT_VIEW_XAXIS)) { diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index f44a94a63f8..0bdc9e4e6ea 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -539,7 +539,7 @@ UvVertMap *BM_uv_vert_map_create(BMesh *bm, UvVertMap *vmap; UvMapVert *buf; MLoopUV *luv; - unsigned int a; + uint a; int totverts, i, totuv, totfaces; const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV); bool *winding = NULL; @@ -669,7 +669,7 @@ UvVertMap *BM_uv_vert_map_create(BMesh *bm, return vmap; } -UvMapVert *BM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v) +UvMapVert *BM_uv_vert_map_at_index(UvVertMap *vmap, uint v) { return vmap->vert[v]; } @@ -832,7 +832,7 @@ UvElementMap *BM_uv_element_map_create(BMesh *bm, } if (do_islands) { - unsigned int *map; + uint *map; BMFace **stack; int stacksize = 0; UvElement *islandbuf; @@ -1224,7 +1224,7 @@ BMFace *EDBM_verts_mirror_get_face(BMEditMesh *em, BMFace *f) BMVert **v_mirr_arr = BLI_array_alloca(v_mirr_arr, f->len); BMLoop *l_iter, *l_first; - unsigned int i = 0; + uint i = 0; l_iter = l_first = BM_FACE_FIRST_LOOP(f); do { diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c index 9b599d8df7f..a4243c13940 100644 --- a/source/blender/editors/mesh/mesh_mirror.c +++ b/source/blender/editors/mesh/mesh_mirror.c @@ -119,7 +119,7 @@ int ED_mesh_mirror_spatial_table( /** \name Mesh Topology Mirror API * \{ */ -typedef unsigned int MirrTopoHash_t; +typedef uint MirrTopoHash_t; typedef struct MirrTopoVert_t { MirrTopoHash_t hash; @@ -231,7 +231,7 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em, medge = me->medge; for (a = 0, med = medge; a < totedge; a++, med++) { - const unsigned int i1 = med->v1, i2 = med->v2; + const uint i1 = med->v1, i2 = med->v2; topo_hash[i1]++; topo_hash[i2]++; } @@ -257,7 +257,7 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em, } else { for (a = 0, med = medge; a < totedge; a++, med++) { - const unsigned int i1 = med->v1, i2 = med->v2; + const uint i1 = med->v1, i2 = med->v2; topo_hash[i1] += topo_hash_prev[i2] * topo_pass; topo_hash[i2] += topo_hash_prev[i1] * topo_pass; tot_unique_edges += (topo_hash[i1] != topo_hash[i2]); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 6c5106d3eec..62237b46481 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -1023,10 +1023,10 @@ static float *editmesh_get_mirror_uv( #endif -static unsigned int mirror_facehash(const void *ptr) +static uint mirror_facehash(const void *ptr) { const MFace *mf = ptr; - unsigned int v0, v1; + uint v0, v1; if (mf->v4) { v0 = MIN4(mf->v1, mf->v2, mf->v3, mf->v4); @@ -1119,8 +1119,8 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em, Mesh *me_eval) /* make sure v4 is not 0 if a quad */ if (mf->v4 && mirrormf.v4 == 0) { - SWAP(unsigned int, mirrormf.v1, mirrormf.v3); - SWAP(unsigned int, mirrormf.v2, mirrormf.v4); + SWAP(uint, mirrormf.v1, mirrormf.v3); + SWAP(uint, mirrormf.v2, mirrormf.v4); } hashmf = BLI_ghash_lookup(fhash, &mirrormf); @@ -1174,7 +1174,7 @@ bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], uint dist_px, *r_index = DRW_select_buffer_sample_point(vc.depsgraph, vc.region, vc.v3d, mval); } - if ((*r_index) == 0 || (*r_index) > (unsigned int)me->totpoly) { + if ((*r_index) == 0 || (*r_index) > (uint)me->totpoly) { return false; } @@ -1218,7 +1218,7 @@ bool ED_mesh_pick_face_vert( bContext *C, Object *ob, const int mval[2], uint dist_px, uint *r_index) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); - unsigned int poly_index; + uint poly_index; Mesh *me = ob->data; BLI_assert(me && GS(me->id.name) == ID_ME); @@ -1241,7 +1241,7 @@ bool ED_mesh_pick_face_vert( MPoly *me_eval_mpoly; MLoop *me_eval_mloop; MVert *me_eval_mvert; - unsigned int me_eval_mpoly_len; + uint me_eval_mpoly_len; const int *index_mp_to_orig; me_eval_mpoly = me_eval->mpoly; @@ -1254,7 +1254,7 @@ bool ED_mesh_pick_face_vert( /* tag all verts using this face */ if (index_mp_to_orig) { - unsigned int i; + uint i; for (i = 0; i < me_eval_mpoly_len; i++) { if (index_mp_to_orig[i] == poly_index) { |