diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp index fabde28d7a2..7e35f6fb4f6 100644 --- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp @@ -28,7 +28,7 @@ ConvolutionFilterOperation::ConvolutionFilterOperation() this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_COLOR); this->setResolutionInputSocketIndex(0); - this->m_inputOperation = NULL; + this->m_inputOperation = nullptr; this->setComplex(true); } void ConvolutionFilterOperation::initExecution() @@ -55,8 +55,8 @@ void ConvolutionFilterOperation::set3x3Filter( void ConvolutionFilterOperation::deinitExecution() { - this->m_inputOperation = NULL; - this->m_inputValueOperation = NULL; + this->m_inputOperation = nullptr; + this->m_inputValueOperation = nullptr; } void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/) @@ -76,27 +76,27 @@ void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, voi CLAMP(y2, 0, getHeight() - 1); CLAMP(y3, 0, getHeight() - 1); float value[4]; - this->m_inputValueOperation->read(value, x2, y2, NULL); + this->m_inputValueOperation->read(value, x2, y2, nullptr); const float mval = 1.0f - value[0]; zero_v4(output); - this->m_inputOperation->read(in1, x1, y1, NULL); + this->m_inputOperation->read(in1, x1, y1, nullptr); madd_v4_v4fl(output, in1, this->m_filter[0]); - this->m_inputOperation->read(in1, x2, y1, NULL); + this->m_inputOperation->read(in1, x2, y1, nullptr); madd_v4_v4fl(output, in1, this->m_filter[1]); - this->m_inputOperation->read(in1, x3, y1, NULL); + this->m_inputOperation->read(in1, x3, y1, nullptr); madd_v4_v4fl(output, in1, this->m_filter[2]); - this->m_inputOperation->read(in1, x1, y2, NULL); + this->m_inputOperation->read(in1, x1, y2, nullptr); madd_v4_v4fl(output, in1, this->m_filter[3]); - this->m_inputOperation->read(in2, x2, y2, NULL); + this->m_inputOperation->read(in2, x2, y2, nullptr); madd_v4_v4fl(output, in2, this->m_filter[4]); - this->m_inputOperation->read(in1, x3, y2, NULL); + this->m_inputOperation->read(in1, x3, y2, nullptr); madd_v4_v4fl(output, in1, this->m_filter[5]); - this->m_inputOperation->read(in1, x1, y3, NULL); + this->m_inputOperation->read(in1, x1, y3, nullptr); madd_v4_v4fl(output, in1, this->m_filter[6]); - this->m_inputOperation->read(in1, x2, y3, NULL); + this->m_inputOperation->read(in1, x2, y3, nullptr); madd_v4_v4fl(output, in1, this->m_filter[7]); - this->m_inputOperation->read(in1, x3, y3, NULL); + this->m_inputOperation->read(in1, x3, y3, nullptr); madd_v4_v4fl(output, in1, this->m_filter[8]); output[0] = output[0] * value[0] + in2[0] * mval; |