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:
authorChris Blackbourn <chrisbblend@gmail.com>2022-08-19 05:19:13 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-08-19 05:19:13 +0300
commitcd516d76b6403246d9a34c3b3a67ac54050f3aef (patch)
tree25b6e2a3f3386058644486b60b8ad6307d38e207 /source/blender/bmesh
parente80a9d2645cdc2e73e3984ccf83abfbb744b3eeb (diff)
Cleanup: replace uint cd_loop_uv_offset with int
See https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Integer_Types
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/tools/bmesh_path_region_uv.c9
-rw-r--r--source/blender/bmesh/tools/bmesh_path_region_uv.h6
-rw-r--r--source/blender/bmesh/tools/bmesh_path_uv.c6
-rw-r--r--source/blender/bmesh/tools/bmesh_path_uv.h2
4 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/bmesh/tools/bmesh_path_region_uv.c b/source/blender/bmesh/tools/bmesh_path_region_uv.c
index 5c70f7fa5ec..56090ed9916 100644
--- a/source/blender/bmesh/tools/bmesh_path_region_uv.c
+++ b/source/blender/bmesh/tools/bmesh_path_region_uv.c
@@ -109,9 +109,10 @@ static bool bm_loop_region_test_chain(BMLoop *l, int *const depths[2], const int
static LinkNode *mesh_calc_path_region_elem(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- const uint cd_loop_uv_offset,
+ const int cd_loop_uv_offset,
const char path_htype)
{
+ BLI_assert(cd_loop_uv_offset >= 0);
int ele_loops_len[2];
BMLoop **ele_loops[2];
@@ -397,7 +398,7 @@ static LinkNode *mesh_calc_path_region_elem(BMesh *bm,
LinkNode *BM_mesh_calc_path_uv_region_vert(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- const uint cd_loop_uv_offset,
+ const int cd_loop_uv_offset,
bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data)
{
@@ -426,7 +427,7 @@ LinkNode *BM_mesh_calc_path_uv_region_vert(BMesh *bm,
LinkNode *BM_mesh_calc_path_uv_region_edge(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- const uint cd_loop_uv_offset,
+ const int cd_loop_uv_offset,
bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data)
{
@@ -455,7 +456,7 @@ LinkNode *BM_mesh_calc_path_uv_region_edge(BMesh *bm,
LinkNode *BM_mesh_calc_path_uv_region_face(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- const uint cd_loop_uv_offset,
+ const int cd_loop_uv_offset,
bool (*filter_fn)(BMFace *, void *user_data),
void *user_data)
{
diff --git a/source/blender/bmesh/tools/bmesh_path_region_uv.h b/source/blender/bmesh/tools/bmesh_path_region_uv.h
index fa1b2bfcf9b..f399395e051 100644
--- a/source/blender/bmesh/tools/bmesh_path_region_uv.h
+++ b/source/blender/bmesh/tools/bmesh_path_region_uv.h
@@ -9,7 +9,7 @@
struct LinkNode *BM_mesh_calc_path_uv_region_vert(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- uint cd_loop_uv_offset,
+ int cd_loop_uv_offset,
bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
@@ -17,7 +17,7 @@ struct LinkNode *BM_mesh_calc_path_uv_region_vert(BMesh *bm,
struct LinkNode *BM_mesh_calc_path_uv_region_edge(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- uint cd_loop_uv_offset,
+ int cd_loop_uv_offset,
bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
@@ -25,7 +25,7 @@ struct LinkNode *BM_mesh_calc_path_uv_region_edge(BMesh *bm,
struct LinkNode *BM_mesh_calc_path_uv_region_face(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- uint cd_loop_uv_offset,
+ int cd_loop_uv_offset,
bool (*filter_fn)(BMFace *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
diff --git a/source/blender/bmesh/tools/bmesh_path_uv.c b/source/blender/bmesh/tools/bmesh_path_uv.c
index 3d736cdc3b8..6531677fce6 100644
--- a/source/blender/bmesh/tools/bmesh_path_uv.c
+++ b/source/blender/bmesh/tools/bmesh_path_uv.c
@@ -65,7 +65,7 @@ static void verttag_add_adjacent_uv(HeapSimple *heap,
const struct BMCalcPathUVParams *params)
{
BLI_assert(params->aspect_y != 0.0f);
- const uint cd_loop_uv_offset = params->cd_loop_uv_offset;
+ const int cd_loop_uv_offset = params->cd_loop_uv_offset;
const int l_a_index = BM_elem_index_get(l_a);
const MLoopUV *luv_a = BM_ELEM_CD_GET_VOID_P(l_a, cd_loop_uv_offset);
const float uv_a[2] = {luv_a->uv[0], luv_a->uv[1] / params->aspect_y};
@@ -225,7 +225,7 @@ static void edgetag_add_adjacent_uv(HeapSimple *heap,
const struct BMCalcPathUVParams *params)
{
BLI_assert(params->aspect_y != 0.0f);
- const uint cd_loop_uv_offset = params->cd_loop_uv_offset;
+ const int cd_loop_uv_offset = params->cd_loop_uv_offset;
BMLoop *l_a_verts[2] = {l_a, l_a->next};
const int l_a_index = BM_elem_index_get(l_a);
@@ -462,7 +462,7 @@ static void facetag_add_adjacent_uv(HeapSimple *heap,
const float aspect_v2[2],
const struct BMCalcPathUVParams *params)
{
- const uint cd_loop_uv_offset = params->cd_loop_uv_offset;
+ const int cd_loop_uv_offset = params->cd_loop_uv_offset;
const int f_a_index = BM_elem_index_get(f_a);
/* Loop over faces of face, but do so by first looping over loops. */
diff --git a/source/blender/bmesh/tools/bmesh_path_uv.h b/source/blender/bmesh/tools/bmesh_path_uv.h
index d7b5faa70e5..ebfedba70bb 100644
--- a/source/blender/bmesh/tools/bmesh_path_uv.h
+++ b/source/blender/bmesh/tools/bmesh_path_uv.h
@@ -9,7 +9,7 @@
struct BMCalcPathUVParams {
uint use_topology_distance : 1;
uint use_step_face : 1;
- uint cd_loop_uv_offset;
+ int cd_loop_uv_offset;
float aspect_y;
};