From fb5e2f56109e825ce3c446f80e075ee3dde81c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 4 Sep 2020 16:23:00 +0200 Subject: Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes Should cause no noticeable difference. --- source/blender/freestyle/intern/stroke/StrokeRep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/freestyle/intern/stroke/StrokeRep.cpp') diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index 661c144476c..fe12727b0c0 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -19,6 +19,8 @@ * \brief Class to define the representation of a stroke (for display purpose) */ +#include + #include "StrokeRep.h" #include "Stroke.h" #include "StrokeAdvancedIterators.h" @@ -573,7 +575,7 @@ void Strip::computeTexCoordWithTips(const vector &iStrokeVertice v = iStrokeVertices.begin(); vend = iStrokeVertices.end(); l = (*v)->strokeLength() / spacedThickness; - tiles = int(l + 0.5); // round to the nearest + tiles = std::roundf(l); // round to the nearest fact = (float(tiles) + 0.5) / l; #if 0 -- cgit v1.2.3