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/space_image | |
parent | 04fe37f93116bd3b276ebe86d9fa53f18223ee6a (diff) |
Cleanup: use abbreviated names for unsigned types in editors
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_sequence.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 7bd1b8e8291..c0b1efe0b73 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3107,13 +3107,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; @@ -3198,7 +3198,7 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *region, int mval[2], if (uv[0] >= 0.0f && uv[1] >= 0.0f && uv[0] < 1.0f && uv[1] < 1.0f) { const float *fp; - unsigned char *cp; + uchar *cp; int x = (int)(uv[0] * ibuf->x), y = (int)(uv[1] * ibuf->y); CLAMP(x, 0, ibuf->x - 1); @@ -3210,7 +3210,7 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *region, int mval[2], ret = true; } else if (ibuf->rect) { - cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); + cp = (uchar *)(ibuf->rect + y * ibuf->x + x); rgb_uchar_to_float(r_col, cp); IMB_colormanagement_colorspace_to_scene_linear_v3(r_col, ibuf->rect_colorspace); ret = true; @@ -3230,7 +3230,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); diff --git a/source/blender/editors/space_image/image_sequence.c b/source/blender/editors/space_image/image_sequence.c index cc6fe38866d..245495bd179 100644 --- a/source/blender/editors/space_image/image_sequence.c +++ b/source/blender/editors/space_image/image_sequence.c @@ -69,7 +69,7 @@ static void image_sequence_get_frame_ranges(wmOperator *op, ListBase *ranges) RNA_BEGIN (op->ptr, itemptr, "files") { char base_head[FILE_MAX], base_tail[FILE_MAX]; char head[FILE_MAX], tail[FILE_MAX]; - unsigned short digits; + ushort digits; char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0); ImageFrame *frame = MEM_callocN(sizeof(ImageFrame), "image_frame"); @@ -125,7 +125,7 @@ static int image_get_udim(char *filepath, ListBase *udim_tiles) char filename[FILE_MAX], dirname[FILE_MAXDIR]; BLI_split_dirfile(filepath, dirname, filename, sizeof(dirname), sizeof(filename)); - unsigned short digits; + ushort digits; char base_head[FILE_MAX], base_tail[FILE_MAX]; int id = BLI_stringdec(filename, base_head, base_tail, &digits); |