diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/operations/COM_MapValueOperation.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/compositor/operations/COM_MapValueOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MapValueOperation.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp index e8731c0f146..d99a68a5e00 100644 --- a/source/blender/compositor/operations/COM_MapValueOperation.cpp +++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp @@ -20,33 +20,36 @@ MapValueOperation::MapValueOperation() : NodeOperation() { - this->addInputSocket(COM_DT_VALUE); - this->addOutputSocket(COM_DT_VALUE); - this->m_inputOperation = NULL; + this->addInputSocket(COM_DT_VALUE); + this->addOutputSocket(COM_DT_VALUE); + this->m_inputOperation = NULL; } void MapValueOperation::initExecution() { - this->m_inputOperation = this->getInputSocketReader(0); + this->m_inputOperation = this->getInputSocketReader(0); } -void MapValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MapValueOperation::executePixelSampled(float output[4], + float x, + float y, + PixelSampler sampler) { - float src[4]; - this->m_inputOperation->readSampled(src, x, y, sampler); - TexMapping *texmap = this->m_settings; - float value = (src[0] + texmap->loc[0]) * texmap->size[0]; - if (texmap->flag & TEXMAP_CLIP_MIN) - if (value < texmap->min[0]) - value = texmap->min[0]; - if (texmap->flag & TEXMAP_CLIP_MAX) - if (value > texmap->max[0]) - value = texmap->max[0]; + float src[4]; + this->m_inputOperation->readSampled(src, x, y, sampler); + TexMapping *texmap = this->m_settings; + float value = (src[0] + texmap->loc[0]) * texmap->size[0]; + if (texmap->flag & TEXMAP_CLIP_MIN) + if (value < texmap->min[0]) + value = texmap->min[0]; + if (texmap->flag & TEXMAP_CLIP_MAX) + if (value > texmap->max[0]) + value = texmap->max[0]; - output[0] = value; + output[0] = value; } void MapValueOperation::deinitExecution() { - this->m_inputOperation = NULL; + this->m_inputOperation = NULL; } |