Commit: 416c7a32d816d0ffa575f9e1aab1f78b509bf773 Author: Joseph Eagar Date: Thu Sep 2 11:32:46 2021 -0700 Branches: temp_bmesh_multires https://developer.blender.org/rB416c7a32d816d0ffa575f9e1aab1f78b509bf773
Fix warnings =================================================================== M source/blender/bmesh/bmesh_class.h M source/blender/bmesh/intern/bmesh_construct.c M source/blender/bmesh/intern/bmesh_core.c =================================================================== diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index f3e83780451..6bf8ae62c19 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -623,4 +623,5 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ #endif /* note does not check if ids are enabled for a given element type */ -#define BM_ELEM_GET_ID(bm, elem) BM_ELEM_CD_GET_INT(elem, bm->idmap.cd_id_off[elem->head.htype]) +#define BM_ELEM_GET_ID(bm, elem) \ + BM_ELEM_CD_GET_INT(elem, bm->idmap.cd_id_off[(int)(elem)->head.htype]) diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c index 369de29cd04..295bea15e33 100644 --- a/source/blender/bmesh/intern/bmesh_construct.c +++ b/source/blender/bmesh/intern/bmesh_construct.c @@ -106,7 +106,7 @@ void bm_id_freelist_push(BMesh *bm, uint id) } #endif -static const int _typemap[] = {0, 0, 1, 0, 2, 0, 0, 0, 3}; +// static const int _typemap[] = {0, 0, 1, 0, 2, 0, 0, 0, 3}; static void bm_assign_id_intern(BMesh *bm, BMElem *elem, uint id) { @@ -118,7 +118,7 @@ static void bm_assign_id_intern(BMesh *bm, BMElem *elem, uint id) if (bm->idmap.flag & BM_HAS_ID_MAP) { if (!(bm->idmap.flag & BM_NO_REUSE_IDS)) { - if (!bm->idmap.map || bm->idmap.map_size <= bm->idmap.maxid) { + if (!bm->idmap.map || bm->idmap.map_size <= (int)bm->idmap.maxid) { int size = 2 + bm->idmap.maxid + (bm->idmap.maxid >> 1); BMElem **idmap = MEM_callocN(sizeof(void *) * size, "bmesh idmap"); @@ -193,8 +193,7 @@ void bm_free_id(BMesh *bm, BMElem *elem) #endif if ((bm->idmap.flag & BM_HAS_ID_MAP)) { - if (!(bm->idmap.flag & BM_NO_REUSE_IDS) && bm->idmap.map && id >= 0 && - id < bm->idmap.map_size) { + if (!(bm->idmap.flag & BM_NO_REUSE_IDS) && bm->idmap.map && (int)id < bm->idmap.map_size) { bm->idmap.map[id] = NULL; } else if (bm->idmap.flag & BM_NO_REUSE_IDS) { diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index ccc616f0d41..617de3c0b51 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2833,7 +2833,7 @@ BMVert *bmesh_kernel_unglue_region_make_vert(BMesh *bm, BMLoop *l_sep) edges[0] = l_sep->e; edges[1] = l_sep->prev->e; - for (i = 0; i < ARRAY_SIZE(edges); i++) { + for (i = 0; i < (int)ARRAY_SIZE(edges); i++) { BMEdge *e = edges[i]; bmesh_edge_vert_swap(e, v_new, v_sep); } @@ -2886,7 +2886,7 @@ BMVert *bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int BM_ELEM_API_FLAG_ENABLE(l_sep->prev, LOOP_VISIT); BMLoop *loop_pair[2] = {l_sep, l_sep->prev}; - for (int j = 0; j < ARRAY_SIZE(loop_pair); j++) { + for (int j = 0; j < (int)ARRAY_SIZE(loop_pair); j++) { BMEdge *e = loop_pair[j]->e; if (!BM_ELEM_API_FLAG_TEST(e, EDGE_VISIT)) { BM_ELEM_API_FLAG_ENABLE(e, EDGE_VISIT); @@ -2943,7 +2943,7 @@ BMVert *bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int else { v_new = BM_vert_create(bm, v_sep->co, v_sep, BM_CREATE_NOP); - for (i = 0; i < STACK_SIZE(edges); i++) { + for (i = 0; i < (int)STACK_SIZE(edges); i++) { BMEdge *e = edges[i]; BMLoop *l_iter, *l_first, *l_next; BMEdge *e_new; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs