Cleanup: replace 'unsigned in' with 'uint'
This commit is contained in:
@@ -63,7 +63,7 @@ typedef union {
|
||||
|
||||
typedef struct SortFace {
|
||||
EdgeUUID es[4];
|
||||
unsigned int index;
|
||||
uint index;
|
||||
} SortFace;
|
||||
|
||||
/* Used to detect polys (faces) using exactly the same vertices. */
|
||||
@@ -72,7 +72,7 @@ typedef struct SortPoly {
|
||||
int *verts;
|
||||
int numverts;
|
||||
int loopstart;
|
||||
unsigned int index;
|
||||
uint index;
|
||||
bool invalid; /* Poly index. */
|
||||
} SortPoly;
|
||||
|
||||
@@ -221,15 +221,15 @@ static int search_polyloop_cmp(const void *v1, const void *v2)
|
||||
/* NOLINTNEXTLINE: readability-function-size */
|
||||
bool BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
MVert *mverts,
|
||||
unsigned int totvert,
|
||||
uint totvert,
|
||||
MEdge *medges,
|
||||
unsigned int totedge,
|
||||
uint totedge,
|
||||
MFace *mfaces,
|
||||
unsigned int totface,
|
||||
uint totface,
|
||||
MLoop *mloops,
|
||||
unsigned int totloop,
|
||||
uint totloop,
|
||||
MPoly *mpolys,
|
||||
unsigned int totpoly,
|
||||
uint totpoly,
|
||||
MDeformVert *dverts, /* assume totvert length */
|
||||
const bool do_verbose,
|
||||
const bool do_fixes,
|
||||
@@ -260,7 +260,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
MEdge *me;
|
||||
MLoop *ml;
|
||||
MPoly *mp;
|
||||
unsigned int i, j;
|
||||
uint i, j;
|
||||
int *v;
|
||||
|
||||
bool is_valid = true;
|
||||
@@ -398,14 +398,14 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
SortFace *sort_faces = MEM_callocN(sizeof(SortFace) * totface, "search faces");
|
||||
SortFace *sf;
|
||||
SortFace *sf_prev;
|
||||
unsigned int totsortface = 0;
|
||||
uint totsortface = 0;
|
||||
|
||||
PRINT_ERR("No Polys, only tessellated Faces");
|
||||
|
||||
for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) {
|
||||
bool remove = false;
|
||||
int fidx;
|
||||
unsigned int fv[4];
|
||||
uint fv[4];
|
||||
|
||||
fidx = mf->v4 ? 3 : 2;
|
||||
do {
|
||||
@@ -815,7 +815,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
}
|
||||
|
||||
/* Not technically incorrect since this is unsigned, however,
|
||||
* a value over INT_MAX is almost certainly caused by wrapping an unsigned int. */
|
||||
* a value over INT_MAX is almost certainly caused by wrapping an uint. */
|
||||
if (dw->def_nr >= INT_MAX) {
|
||||
PRINT_ERR("\tVertex deform %u, has invalid group %u", i, dw->def_nr);
|
||||
if (do_fixes) {
|
||||
@@ -1279,7 +1279,7 @@ void BKE_mesh_strip_loose_edges(Mesh *me)
|
||||
MEdge *e;
|
||||
MLoop *l;
|
||||
int a, b;
|
||||
unsigned int *new_idx = MEM_mallocN(sizeof(int) * me->totedge, __func__);
|
||||
uint *new_idx = MEM_mallocN(sizeof(int) * me->totedge, __func__);
|
||||
|
||||
for (a = b = 0, e = me->medge; a < me->totedge; a++, e++) {
|
||||
if (e->v1 != e->v2) {
|
||||
@@ -1317,13 +1317,12 @@ void BKE_mesh_strip_loose_edges(Mesh *me)
|
||||
/* make edges in a Mesh, for outside of editmode */
|
||||
|
||||
struct EdgeSort {
|
||||
unsigned int v1, v2;
|
||||
uint v1, v2;
|
||||
char is_loose, is_draw;
|
||||
};
|
||||
|
||||
/* edges have to be added with lowest index first for sorting */
|
||||
static void to_edgesort(
|
||||
struct EdgeSort *ed, unsigned int v1, unsigned int v2, char is_loose, short is_draw)
|
||||
static void to_edgesort(struct EdgeSort *ed, uint v1, uint v2, char is_loose, short is_draw)
|
||||
{
|
||||
if (v1 < v2) {
|
||||
ed->v1 = v1;
|
||||
@@ -1378,8 +1377,8 @@ static void mesh_calc_edges_mdata(MVert *UNUSED(allvert),
|
||||
EdgeHash *hash;
|
||||
struct EdgeSort *edsort, *ed;
|
||||
int a, totedge = 0;
|
||||
unsigned int totedge_final = 0;
|
||||
unsigned int edge_index;
|
||||
uint totedge_final = 0;
|
||||
uint edge_index;
|
||||
|
||||
/* we put all edges in array, sort them, and detect doubles that way */
|
||||
|
||||
@@ -1445,7 +1444,7 @@ static void mesh_calc_edges_mdata(MVert *UNUSED(allvert),
|
||||
/* order is swapped so extruding this edge as a surface wont flip face normals
|
||||
* with cyclic curves */
|
||||
if (ed->v1 + 1 != ed->v2) {
|
||||
SWAP(unsigned int, med->v1, med->v2);
|
||||
SWAP(uint, med->v1, med->v2);
|
||||
}
|
||||
med++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user