From 3302fbaeb1d5f58d926c06b6153ec5d6f1a9b0be Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Apr 2019 11:21:22 +1000 Subject: Cleanup: style, use braces for compositor --- source/blender/compositor/operations/COM_WrapOperation.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/compositor/operations/COM_WrapOperation.cpp') diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp index e55f63f7d73..cb119fb4f1d 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.cpp +++ b/source/blender/compositor/operations/COM_WrapOperation.cpp @@ -25,19 +25,23 @@ WrapOperation::WrapOperation(DataType datatype) : ReadBufferOperation(datatype) inline float WrapOperation::getWrappedOriginalXPos(float x) { - if (this->getWidth() == 0) + if (this->getWidth() == 0) { return 0; - while (x < 0) + } + while (x < 0) { x += this->m_width; + } return fmodf(x, this->getWidth()); } inline float WrapOperation::getWrappedOriginalYPos(float y) { - if (this->getHeight() == 0) + if (this->getHeight() == 0) { return 0; - while (y < 0) + } + while (y < 0) { y += this->m_height; + } return fmodf(y, this->getHeight()); } -- cgit v1.2.3