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/compositor/operations/COM_DenoiseOperation.cpp | |
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/compositor/operations/COM_DenoiseOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DenoiseOperation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.cpp b/source/blender/compositor/operations/COM_DenoiseOperation.cpp index 202e614c0c5..4087056a79d 100644 --- a/source/blender/compositor/operations/COM_DenoiseOperation.cpp +++ b/source/blender/compositor/operations/COM_DenoiseOperation.cpp @@ -105,7 +105,7 @@ void DenoiseOperation::generateDenoise(float *data, inputTileColor->getWidth(), inputTileColor->getHeight(), 0, - 4 * sizeof(float)); + sizeof(float[4])); if (inputTileNormal && inputTileNormal->getBuffer()) { filter.setImage("normal", inputTileNormal->getBuffer(), @@ -113,7 +113,7 @@ void DenoiseOperation::generateDenoise(float *data, inputTileNormal->getWidth(), inputTileNormal->getHeight(), 0, - 3 * sizeof(float)); + sizeof(float[3])); } if (inputTileAlbedo && inputTileAlbedo->getBuffer()) { filter.setImage("albedo", @@ -122,7 +122,7 @@ void DenoiseOperation::generateDenoise(float *data, inputTileAlbedo->getWidth(), inputTileAlbedo->getHeight(), 0, - 4 * sizeof(float)); + sizeof(float[4])); } filter.setImage("output", data, @@ -130,7 +130,7 @@ void DenoiseOperation::generateDenoise(float *data, inputTileColor->getWidth(), inputTileColor->getHeight(), 0, - 4 * sizeof(float)); + sizeof(float[4])); BLI_assert(settings); if (settings) { @@ -158,5 +158,5 @@ void DenoiseOperation::generateDenoise(float *data, UNUSED_VARS(inputTileAlbedo, inputTileNormal, settings); ::memcpy(data, inputBufferColor, - inputTileColor->getWidth() * inputTileColor->getHeight() * sizeof(float) * 4); + sizeof(float[4]) * inputTileColor->getWidth() * inputTileColor->getHeight()); } |