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_CompositorOperation.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_CompositorOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_CompositorOperation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index 71cef9dc4da..8d55fe53aa7 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -65,11 +65,11 @@ void CompositorOperation::initExecution() this->m_depthInput = getInputSocketReader(2); if (this->getWidth() * this->getHeight() != 0) { this->m_outputBuffer = (float *)MEM_callocN( - this->getWidth() * this->getHeight() * 4 * sizeof(float), "CompositorOperation"); + sizeof(float[4]) * this->getWidth() * this->getHeight(), "CompositorOperation"); } if (this->m_depthInput != NULL) { this->m_depthBuffer = (float *)MEM_callocN( - this->getWidth() * this->getHeight() * sizeof(float), "CompositorOperation"); + sizeof(float) * this->getWidth() * this->getHeight(), "CompositorOperation"); } } |