diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 10:04:52 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:26:27 +0300 |
commit | 891949cbb47143420f4324cb60efc05ef5d70b39 (patch) | |
tree | fe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/imbuf/intern | |
parent | c9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff) |
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/thumbs_font.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/thumbs_font.c b/source/blender/imbuf/intern/thumbs_font.c index 0f18e9dd4cb..c3ed81698d9 100644 --- a/source/blender/imbuf/intern/thumbs_font.c +++ b/source/blender/imbuf/intern/thumbs_font.c @@ -19,7 +19,7 @@ /* Only change if we need to update the previews in the on-disk cache. */ #define FONT_THUMB_VERSION "1.0.0" -struct ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned int y) +struct ImBuf *IMB_thumb_load_font(const char *filename, uint x, uint y) { struct ImBuf *ibuf = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata); @@ -27,8 +27,7 @@ struct ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f}; IMB_rectfill(ibuf, col); - if (!BLF_thumb_preview( - filename, (unsigned char *)ibuf->rect, ibuf->x, ibuf->y, ibuf->channels)) { + if (!BLF_thumb_preview(filename, (uchar *)ibuf->rect, ibuf->x, ibuf->y, ibuf->channels)) { IMB_freeImBuf(ibuf); ibuf = NULL; } @@ -38,7 +37,7 @@ struct ImBuf *IMB_thumb_load_font(const char *filename, unsigned int x, unsigned bool IMB_thumb_load_font_get_hash(char *r_hash) { - unsigned char digest[16]; + uchar digest[16]; BLI_hash_md5_buffer(FONT_THUMB_VERSION, sizeof(FONT_THUMB_VERSION), digest); r_hash[0] = '\0'; BLI_hash_md5_to_hexdigest(digest, r_hash); |