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/object | |
parent | 04fe37f93116bd3b276ebe86d9fa53f18223ee6a (diff) |
Cleanup: use abbreviated names for unsigned types in editors
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_random.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_remesh.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 3 |
7 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index ac2958282c1..65d3196d8c3 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1738,10 +1738,10 @@ static void copy_object_set_idnew(bContext *C) * In other words, we consider each group of objects from a same item as being * the 'local group' where to check for parents. */ -static unsigned int dupliobject_hash(const void *ptr) +static uint dupliobject_hash(const void *ptr) { const DupliObject *dob = ptr; - unsigned int hash = BLI_ghashutil_ptrhash(dob->ob); + uint hash = BLI_ghashutil_ptrhash(dob->ob); if (dob->type == OB_DUPLICOLLECTION) { for (int i = 1; (i < MAX_DUPLI_RECUR) && dob->persistent_id[i] != INT_MAX; i++) { @@ -1760,10 +1760,10 @@ static unsigned int dupliobject_hash(const void *ptr) * since its a unique index and we only want to know if the group objects are from the same * dupli-group instance. */ -static unsigned int dupliobject_instancer_hash(const void *ptr) +static uint dupliobject_instancer_hash(const void *ptr) { const DupliObject *dob = ptr; - unsigned int hash = BLI_ghashutil_inthash(dob->persistent_id[0]); + uint hash = BLI_ghashutil_inthash(dob->persistent_id[0]); for (int i = 1; (i < MAX_DUPLI_RECUR) && dob->persistent_id[i] != INT_MAX; i++) { hash ^= (dob->persistent_id[i] ^ i); } diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 7d39d2546b6..481d5dfb9a5 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -234,7 +234,7 @@ static bool write_internal_bake_pixels(Image *image, ibuf->x); } else { - IMB_buffer_byte_from_float((unsigned char *)ibuf->rect, + IMB_buffer_byte_from_float((uchar *)ibuf->rect, buffer, ibuf->channels, ibuf->dither, @@ -259,7 +259,7 @@ static bool write_internal_bake_pixels(Image *image, mask_buffer); } else { - IMB_buffer_byte_from_float_mask((unsigned char *)ibuf->rect, + IMB_buffer_byte_from_float_mask((uchar *)ibuf->rect, buffer, ibuf->channels, ibuf->dither, @@ -359,7 +359,7 @@ static bool write_external_bake_pixels(const char *filepath, buffer, ibuf->x, ibuf->y, ibuf->channels, from_colorspace, to_colorspace, false); } - IMB_buffer_byte_from_float((unsigned char *)ibuf->rect, + IMB_buffer_byte_from_float((uchar *)ibuf->rect, buffer, ibuf->channels, ibuf->dither, diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 0de2f114b94..2babf27eb61 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -2148,7 +2148,7 @@ static int correctivesmooth_bind_exec(bContext *C, wmOperator *op) /* Signal to modifier to recalculate. */ CorrectiveSmoothModifierData *csmd_eval = (CorrectiveSmoothModifierData *) modifier_get_evaluated(depsgraph, ob, &csmd->modifier); - csmd_eval->bind_coords_num = (unsigned int)-1; + csmd_eval->bind_coords_num = (uint)-1; /* Force modifier to run, it will call binding routine * (this has to happen outside of depsgraph evaluation). */ diff --git a/source/blender/editors/object/object_random.c b/source/blender/editors/object/object_random.c index 43aaecb887b..a6958c798f1 100644 --- a/source/blender/editors/object/object_random.c +++ b/source/blender/editors/object/object_random.c @@ -50,7 +50,7 @@ static bool object_rand_transverts(TransVertStore *tvs, const float offset, const float uniform, const float normal_factor, - const unsigned int seed) + const uint seed) { bool use_normal = (normal_factor != 0.0f); struct RNG *rng; @@ -100,7 +100,7 @@ static int object_rand_verts_exec(bContext *C, wmOperator *op) const float offset = RNA_float_get(op->ptr, "offset"); const float uniform = RNA_float_get(op->ptr, "uniform"); const float normal_factor = RNA_float_get(op->ptr, "normal"); - const unsigned int seed = RNA_int_get(op->ptr, "seed"); + const uint seed = RNA_int_get(op->ptr, "seed"); bool changed_multi = false; uint objects_len = 0; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 3166c9ddea1..5d821308759 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1424,7 +1424,7 @@ void OBJECT_OT_track_set(wmOperatorType *ot) * \{ */ #if 0 -static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr)) +static void link_to_scene(Main *UNUSED(bmain), ushort UNUSED(nr)) { Scene *sce = (Scene *)BLI_findlink(&bmain->scene, G.curscreen->scenenr - 1); Base *base, *nbase; diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index 8a803821fe4..b2b372df055 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -653,13 +653,13 @@ static bool mesh_is_manifold_consistent(Mesh *mesh) const MLoop *mloop = mesh->mloop; char *edge_faces = (char *)MEM_callocN(mesh->totedge * sizeof(char), "remesh_manifold_check"); int *edge_vert = (int *)MEM_malloc_arrayN( - mesh->totedge, sizeof(unsigned int), "remesh_consistent_check"); + mesh->totedge, sizeof(uint), "remesh_consistent_check"); - for (unsigned int i = 0; i < mesh->totedge; i++) { + for (uint i = 0; i < mesh->totedge; i++) { edge_vert[i] = -1; } - for (unsigned int loop_idx = 0; loop_idx < mesh->totloop; loop_idx++) { + for (uint loop_idx = 0; loop_idx < mesh->totloop; loop_idx++) { const MLoop *loop = &mloop[loop_idx]; edge_faces[loop->e] += 1; if (edge_faces[loop->e] > 2) { @@ -679,7 +679,7 @@ static bool mesh_is_manifold_consistent(Mesh *mesh) if (is_manifold_consistent) { /* check for wire edges */ - for (unsigned int i = 0; i < mesh->totedge; i++) { + for (uint i = 0; i < mesh->totedge; i++) { if (edge_faces[i] == 0) { is_manifold_consistent = false; break; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 28bb28a0298..46245d21d5b 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1860,8 +1860,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const if (event->type == MOUSEMOVE || is_translate_init) { const ViewDepths *depths = xfd->vc.rv3d->depths; - if (depths && ((unsigned int)event->mval[0] < depths->w) && - ((unsigned int)event->mval[1] < depths->h)) { + if (depths && ((uint)event->mval[0] < depths->w) && ((uint)event->mval[1] < depths->h)) { double depth = (double)ED_view3d_depth_read_cached(&xfd->vc, event->mval); float location_world[3]; if (depth == 1.0f) { |