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/editors/screen/glutil.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/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 05eac574d9d..bcbb735d93d 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -566,7 +566,7 @@ int ED_draw_imbuf_method(ImBuf *ibuf) if (U.image_draw_method == IMAGE_DRAW_METHOD_AUTO) { /* Use faster GLSL when CPU to GPU transfer is unlikely to be a bottleneck, * otherwise do color management on CPU side. */ - const size_t threshold = 2048 * 2048 * 4 * sizeof(float); + const size_t threshold = sizeof(float[4]) * 2048 * 2048; const size_t data_size = (ibuf->rect_float) ? sizeof(float) : sizeof(uchar); const size_t size = ibuf->x * ibuf->y * ibuf->channels * data_size; |