Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-09-04 17:23:00 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-04 17:23:08 +0300
commitfb5e2f56109e825ce3c446f80e075ee3dde81c3d (patch)
tree20b5808415568f503b4ed4b56d3d4f50b5fe8cee /source/blender/compositor
parentee49ce482a797a5937829de497abd69bcd1edb48 (diff)
Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes
Should cause no noticeable difference.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index c25e8ba897c..952f69c3787 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -16,6 +16,8 @@
* Copyright 2011, Blender Foundation.
*/
+#include <math.h>
+
#include "COM_WrapOperation.h"
WrapOperation::WrapOperation(DataType datatype) : ReadBufferOperation(datatype)
@@ -90,7 +92,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
if (m_wrappingType == CMP_NODE_WRAP_X || m_wrappingType == CMP_NODE_WRAP_XY) {
// wrap only on the x-axis if tile is wrapping
newInput.xmin = getWrappedOriginalXPos(input->xmin);
- newInput.xmax = getWrappedOriginalXPos(input->xmax) + 0.5f;
+ newInput.xmax = roundf(getWrappedOriginalXPos(input->xmax));
if (newInput.xmin >= newInput.xmax) {
newInput.xmin = 0;
newInput.xmax = this->getWidth();
@@ -99,7 +101,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
if (m_wrappingType == CMP_NODE_WRAP_Y || m_wrappingType == CMP_NODE_WRAP_XY) {
// wrap only on the y-axis if tile is wrapping
newInput.ymin = getWrappedOriginalYPos(input->ymin);
- newInput.ymax = getWrappedOriginalYPos(input->ymax) + 0.5f;
+ newInput.ymax = roundf(getWrappedOriginalYPos(input->ymax));
if (newInput.ymin >= newInput.ymax) {
newInput.ymin = 0;
newInput.ymax = this->getHeight();