diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 13:32:45 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 14:38:06 +0300 |
commit | f453ee7d3ab4be78f7bd0be5aa14d2a281552629 (patch) | |
tree | 2ab10475fa4c5b05cf36c6b073a5452feacbba38 /source/blender/compositor/intern/COM_NodeOperation.cpp | |
parent | fb18e48a84a645a1ef8329f150b223afe0efc7f0 (diff) |
Cleanup: Compositor, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/compositor` module.
No functional changes.
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeOperation.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeOperation.cpp | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp index fa4b5a07c65..4e3c5d2df6c 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.cpp +++ b/source/blender/compositor/intern/COM_NodeOperation.cpp @@ -145,9 +145,8 @@ NodeOperation *NodeOperation::getInputOperation(unsigned int inputSocketIndex) if (input && input->isConnected()) { return &input->getLink()->getOperation(); } - else { - return NULL; - } + + return NULL; } void NodeOperation::getConnectedInputSockets(Inputs *sockets) @@ -168,30 +167,29 @@ bool NodeOperation::determineDependingAreaOfInterest(rcti *input, BLI_rcti_init(output, input->xmin, input->xmax, input->ymin, input->ymax); return false; } - else { - rcti tempOutput; - bool first = true; - for (int i = 0; i < getNumberOfInputSockets(); i++) { - NodeOperation *inputOperation = this->getInputOperation(i); - if (inputOperation && - inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) { - if (first) { - output->xmin = tempOutput.xmin; - output->ymin = tempOutput.ymin; - output->xmax = tempOutput.xmax; - output->ymax = tempOutput.ymax; - first = false; - } - else { - output->xmin = min(output->xmin, tempOutput.xmin); - output->ymin = min(output->ymin, tempOutput.ymin); - output->xmax = max(output->xmax, tempOutput.xmax); - output->ymax = max(output->ymax, tempOutput.ymax); - } + + rcti tempOutput; + bool first = true; + for (int i = 0; i < getNumberOfInputSockets(); i++) { + NodeOperation *inputOperation = this->getInputOperation(i); + if (inputOperation && + inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) { + if (first) { + output->xmin = tempOutput.xmin; + output->ymin = tempOutput.ymin; + output->xmax = tempOutput.xmax; + output->ymax = tempOutput.ymax; + first = false; + } + else { + output->xmin = min(output->xmin, tempOutput.xmin); + output->ymin = min(output->ymin, tempOutput.ymin); + output->xmax = max(output->xmax, tempOutput.xmax); + output->ymax = max(output->ymax, tempOutput.ymax); } } - return !first; } + return !first; } /***************** @@ -210,9 +208,8 @@ SocketReader *NodeOperationInput::getReader() if (isConnected()) { return &m_link->getOperation(); } - else { - return NULL; - } + + return NULL; } void NodeOperationInput::determineResolution(unsigned int resolution[2], |