diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:12:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:23:25 +0300 |
commit | 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch) | |
tree | 0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp | |
parent | ab823176d31dc155645de733f1cd4fbd6ad74592 (diff) |
Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
Diffstat (limited to 'source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp index 2c12091c458..3058a5990c6 100644 --- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp @@ -89,18 +89,18 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect) this->m_sy = this->m_data.sizey * this->m_size / 2.0f; if ((this->m_sx == this->m_sy) && (this->m_sx > 0.0f)) { - for (c = 0; c < COM_NUM_CHANNELS_COLOR; ++c) { + for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) { IIR_gauss(copy, this->m_sx, c, 3); } } else { if (this->m_sx > 0.0f) { - for (c = 0; c < COM_NUM_CHANNELS_COLOR; ++c) { + for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) { IIR_gauss(copy, this->m_sx, c, 1); } } if (this->m_sy > 0.0f) { - for (c = 0; c < COM_NUM_CHANNELS_COLOR; ++c) { + for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) { IIR_gauss(copy, this->m_sy, c, 2); } } @@ -216,16 +216,16 @@ void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, W = (double *)MEM_callocN(sz * sizeof(double), "IIR_gauss W buf"); if (xy & 1) { // H int offset; - for (y = 0; y < src_height; ++y) { + for (y = 0; y < src_height; y++) { const int yx = y * src_width; offset = yx * num_channels + chan; - for (x = 0; x < src_width; ++x) { + for (x = 0; x < src_width; x++) { X[x] = buffer[offset]; offset += num_channels; } YVV(src_width); offset = yx * num_channels + chan; - for (x = 0; x < src_width; ++x) { + for (x = 0; x < src_width; x++) { buffer[offset] = Y[x]; offset += num_channels; } @@ -235,15 +235,15 @@ void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, int offset; const int add = src_width * num_channels; - for (x = 0; x < src_width; ++x) { + for (x = 0; x < src_width; x++) { offset = x * num_channels + chan; - for (y = 0; y < src_height; ++y) { + for (y = 0; y < src_height; y++) { X[y] = buffer[offset]; offset += add; } YVV(src_height); offset = x * num_channels + chan; - for (y = 0; y < src_height; ++y) { + for (y = 0; y < src_height; y++) { buffer[offset] = Y[y]; offset += add; } |