diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 23:57:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 23:57:14 +0400 |
commit | 8e7d7d5ea56c75739164b98f5fb2f97ff51d697b (patch) | |
tree | 7dcdd0f713993af8af39b65cee89b2e11b7f780b /source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp | |
parent | 2c1abe1f5861330315a1fc58e7dfe298b8356449 (diff) |
code cleanup: reduce float/double promotion
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp index 852754416f4..2eb51b4577f 100644 --- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp @@ -77,7 +77,7 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff tempColor[1] = 0; tempColor[2] = 0; tempColor[3] = 0; - float overallmultiplyer = 0; + float overallmultiplyer = 0.0f; MemoryBuffer *inputBuffer = (MemoryBuffer*)data; float *buffer = inputBuffer->getBuffer(); int bufferwidth = inputBuffer->getWidth(); @@ -106,11 +106,11 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff overallmultiplyer += multiplyer; bufferindex +=offsetadd; } - float divider = 1.0/overallmultiplyer; - color[0] = tempColor[0]*divider; - color[1] = tempColor[1]*divider; - color[2] = tempColor[2]*divider; - color[3] = tempColor[3]*divider; + float divider = 1.0f / overallmultiplyer; + color[0] = tempColor[0] * divider; + color[1] = tempColor[1] * divider; + color[2] = tempColor[2] * divider; + color[3] = tempColor[3] * divider; } void GaussianXBlurOperation::deinitExecution() |