diff options
Diffstat (limited to 'source/blender/editors')
7 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 95f43733a36..5c3724e6ea4 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -576,7 +576,7 @@ static int gpencil_select_random_exec(bContext *C, wmOperator *op) if (selectmode == GP_SELECTMODE_STROKE) { RNG *rng = BLI_rng_new(seed_iter); - const unsigned int j = BLI_rng_get_uint(rng) % gps->totpoints; + const uint j = BLI_rng_get_uint(rng) % gps->totpoints; bool select_stroke = ((gps->totpoints * randfac) <= j) ? true : false; select_stroke ^= select; /* Curve function has select parameter inverted. */ @@ -647,7 +647,7 @@ static int gpencil_select_random_exec(bContext *C, wmOperator *op) if (selectmode == GP_SELECTMODE_STROKE) { RNG *rng = BLI_rng_new(seed_iter); - const unsigned int j = BLI_rng_get_uint(rng) % gps->totpoints; + const uint j = BLI_rng_get_uint(rng) % gps->totpoints; bool select_stroke = ((gps->totpoints * randfac) <= j) ? true : false; select_stroke ^= select; select_all_stroke_points(gpd, gps, select_stroke); diff --git a/source/blender/editors/gpencil/gpencil_trace_utils.c b/source/blender/editors/gpencil/gpencil_trace_utils.c index 735759d40ec..aa9a2a653bb 100644 --- a/source/blender/editors/gpencil/gpencil_trace_utils.c +++ b/source/blender/editors/gpencil/gpencil_trace_utils.c @@ -119,7 +119,7 @@ static void pixel_at_index(const ImBuf *ibuf, const int32_t idx, float r_col[4]) copy_v4_v4(r_col, frgba); } else { - unsigned char *cp = (unsigned char *)(ibuf->rect + idx); + uchar *cp = (uchar *)(ibuf->rect + idx); r_col[0] = (float)cp[0] / 255.0f; r_col[1] = (float)cp[1] / 255.0f; r_col[2] = (float)cp[2] / 255.0f; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 5c8ff930eb8..4fc44f01ea0 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -619,7 +619,7 @@ struct UvElement **BM_uv_element_map_ensure_head_table(struct UvElementMap *elem return element_map->head_table; } -#define INVALID_ISLAND ((unsigned int)-1) +#define INVALID_ISLAND ((uint)-1) static void bm_uv_assign_island(UvElementMap *element_map, UvElement *element, diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index bdaa3523402..781866db6a0 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1047,8 +1047,8 @@ static void bake_targets_populate_pixels_color_attributes(BakeTargets *targets, const MLoopTri *lt = &looptri[i]; for (int j = 0; j < 3; j++) { - unsigned int l = lt->tri[j]; - unsigned int v = loops[l].v; + uint l = lt->tri[j]; + uint v = loops[l].v; /* Map back to original loop if there are modifiers. */ if (vert_origindex != NULL && poly_origindex != NULL) { diff --git a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc index f5657b004e2..dc45a7ec51c 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc +++ b/source/blender/editors/sculpt_paint/paint_image_2d_curve_mask.cc @@ -55,7 +55,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache, int offset = (int)floorf(diameter / 2.0f); int clamped_radius = max_ff(radius, 1.0); - unsigned short *m = curve_mask_cache->curve_mask; + ushort *m = curve_mask_cache->curve_mask; const int aa_samples = aa_samples_per_texel_axis(brush, radius); const float aa_offset = 1.0f / (2.0f * (float)aa_samples); @@ -87,7 +87,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache, } pixel_xy[0] += aa_step; } - *m = (unsigned short)(total_weight * weight_factor); + *m = (ushort)(total_weight * weight_factor); } } } @@ -140,8 +140,7 @@ static void curve_mask_free(CurveMaskCache *curve_mask_cache) static void curve_mask_allocate(CurveMaskCache *curve_mask_cache, const int diameter) { const size_t curve_mask_size = diameter_to_curve_mask_size(diameter); - curve_mask_cache->curve_mask = static_cast<unsigned short *>( - MEM_mallocN(curve_mask_size, __func__)); + curve_mask_cache->curve_mask = static_cast<ushort *>(MEM_mallocN(curve_mask_size, __func__)); curve_mask_cache->curve_mask_size = curve_mask_size; } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 71804d29e6b..ce12629f9d6 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1198,7 +1198,7 @@ static void fcurve_batch_add_verts(GPUVertBuf *vbo, float y_height, int timeline_frame, float curve_val, - unsigned int *vert_count) + uint *vert_count) { float vert_pos[2][2]; diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index f222f93d2b6..b1c8fc42d08 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -52,13 +52,13 @@ typedef struct ImageSampleInfo { int width, height; int sample_size; - unsigned char col[4]; + uchar col[4]; float colf[4]; float linearcol[4]; int z; float zf; - unsigned char *colp; + uchar *colp; const float *colfp; int *zp; float *zfp; @@ -79,7 +79,7 @@ static void image_sample_pixel_color_ubyte(const ImBuf *ibuf, uchar r_col[4], float r_col_linear[4]) { - const uchar *cp = (unsigned char *)(ibuf->rect + coord[1] * ibuf->x + coord[0]); + const uchar *cp = (uchar *)(ibuf->rect + coord[1] * ibuf->x + coord[0]); copy_v4_v4_uchar(r_col, cp); rgba_uchar_to_float(r_col_linear, r_col); IMB_colormanagement_colorspace_to_scene_linear_v4(r_col_linear, false, ibuf->rect_colorspace); @@ -311,7 +311,7 @@ static void sequencer_sample_apply(bContext *C, wmOperator *op, const wmEvent *e if (fx >= 0.0f && fy >= 0.0f && fx < ibuf->x && fy < ibuf->y) { const float *fp; - unsigned char *cp; + uchar *cp; int x = (int)fx, y = (int)fy; info->x = x; @@ -323,7 +323,7 @@ static void sequencer_sample_apply(bContext *C, wmOperator *op, const wmEvent *e info->colfp = NULL; if (ibuf->rect) { - cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); + cp = (uchar *)(ibuf->rect + y * ibuf->x + x); info->col[0] = cp[0]; info->col[1] = cp[1]; |