diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-08 06:29:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-08 06:38:00 +0300 |
commit | 171e77c3c25a1224fc5f7db40ec6f8879f8dbbb0 (patch) | |
tree | ea51f4fa508a39807e6f6d333b2d53af8a2b9fc1 /source/blender/imbuf/intern/colormanagement.c | |
parent | 4bf3ca20165959f98c7c830a138ba2901d3dd851 (diff) |
Cleanup: use array syntax for sizeof with fixed values
Also order sizeof(..) first to promote other values to size_t.
Diffstat (limited to 'source/blender/imbuf/intern/colormanagement.c')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 08e1bc5f674..2c42d59a2d9 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -2342,7 +2342,7 @@ void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, } } else { - memcpy(out, in, sizeof(float) * 4 * width); + memcpy(out, in, sizeof(float[4]) * width); } } } @@ -3511,7 +3511,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, size_t display_offset = ((size_t)display_stride * i + xmin) * 4; memcpy( - display_buffer + display_offset, byte_buffer + byte_offset, 4 * sizeof(char) * width); + display_buffer + display_offset, byte_buffer + byte_offset, sizeof(char[4]) * width); } } } |