From aa3a4973a30ff668a62447e18ac41f6c916b4a8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Nov 2020 12:30:59 +1100 Subject: Cleanup: use ELEM macro --- source/blender/compositor/nodes/COM_KeyingNode.cpp | 2 +- source/blender/compositor/operations/COM_WrapOperation.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp index a0ccaf0b9da..53cf64c5c3f 100644 --- a/source/blender/compositor/nodes/COM_KeyingNode.cpp +++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp @@ -63,7 +63,7 @@ NodeOperationOutput *KeyingNode::setupPreBlur(NodeConverter &converter, converter.addLink(convertRGBToYCCOperation->getOutputSocket(0), separateOperation->getInputSocket(0)); - if (channel == 0 || channel == 3) { + if (ELEM(channel, 0, 3)) { converter.addLink(separateOperation->getOutputSocket(0), combineOperation->getInputSocket(channel)); } diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp index 952f69c3787..7f7c1b7b639 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.cpp +++ b/source/blender/compositor/operations/COM_WrapOperation.cpp @@ -89,7 +89,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input, newInput.ymin = input->ymin; newInput.ymax = input->ymax; - if (m_wrappingType == CMP_NODE_WRAP_X || m_wrappingType == CMP_NODE_WRAP_XY) { + if (ELEM(m_wrappingType, CMP_NODE_WRAP_X, CMP_NODE_WRAP_XY)) { // wrap only on the x-axis if tile is wrapping newInput.xmin = getWrappedOriginalXPos(input->xmin); newInput.xmax = roundf(getWrappedOriginalXPos(input->xmax)); @@ -98,7 +98,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input, newInput.xmax = this->getWidth(); } } - if (m_wrappingType == CMP_NODE_WRAP_Y || m_wrappingType == CMP_NODE_WRAP_XY) { + if (ELEM(m_wrappingType, CMP_NODE_WRAP_Y, CMP_NODE_WRAP_XY)) { // wrap only on the y-axis if tile is wrapping newInput.ymin = getWrappedOriginalYPos(input->ymin); newInput.ymax = roundf(getWrappedOriginalYPos(input->ymax)); -- cgit v1.2.3