diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-27 22:02:22 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-27 22:50:07 +0300 |
commit | 2f0c40c7a27066755f29b2fb3960052ba4587b1f (patch) | |
tree | 97cbfceb4347d88b71cb1430c3df8e172cca8a5d | |
parent | b6ee599d9205814aacd95a2aa09e1dba47e7494d (diff) |
Cleanup: Use signed integers for mesh vertex indices
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index de89abf9cf6..0a000f4543a 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -106,7 +106,7 @@ void BKE_mesh_ensure_default_orig_index_customdata_no_check(struct Mesh *mesh); * Find the index of the loop in 'poly' which references vertex, * returns -1 if not found */ -int poly_find_loop_from_vert(const struct MPoly *poly, const struct MLoop *loopstart, uint vert); +int poly_find_loop_from_vert(const struct MPoly *poly, const struct MLoop *loopstart, int vert); /** * Fill \a r_adj with the loop indices in \a poly adjacent to the * vertex. Returns the index of the loop matching vertex, or -1 if the @@ -114,8 +114,8 @@ int poly_find_loop_from_vert(const struct MPoly *poly, const struct MLoop *loops */ int poly_get_adj_loops_from_vert(const struct MPoly *poly, const struct MLoop *mloop, - unsigned int vert, - unsigned int r_adj[2]); + int vert, + int r_adj[2]); /** * Return the index of the edge vert that is not equal to \a v. If diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 7079a3e1ae8..dfd023b548b 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -1459,7 +1459,7 @@ void BKE_mesh_auto_smooth_flag_set(Mesh *me, } } -int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, uint vert) +int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, int vert) { for (int j = 0; j < poly->totloop; j++, loopstart++) { if (loopstart->v == vert) { @@ -1470,7 +1470,7 @@ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, uint ver return -1; } -int poly_get_adj_loops_from_vert(const MPoly *poly, const MLoop *mloop, uint vert, uint r_adj[2]) +int poly_get_adj_loops_from_vert(const MPoly *poly, const MLoop *mloop, int vert, int r_adj[2]) { int corner = poly_find_loop_from_vert(poly, &mloop[poly->loopstart], vert); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ce00f20b88e..a300edff042 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -799,7 +799,7 @@ static void sculpt_vertex_neighbors_get_faces(SculptSession *ss, continue; } const MPoly *p = &ss->mpoly[vert_map->indices[i]]; - uint f_adj_v[2]; + int f_adj_v[2]; if (poly_get_adj_loops_from_vert(p, ss->mloop, vertex.i, f_adj_v) != -1) { for (int j = 0; j < ARRAY_SIZE(f_adj_v); j += 1) { if (f_adj_v[j] != vertex.i) { |