From 725973485a909c2b732c58bd49d06a75edd52f7e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 13 Jul 2020 11:27:09 +0200 Subject: Clang Tidy: enable readability-non-const-parameter warning Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199 --- source/blender/blenkernel/intern/dynamicpaint.c | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'source/blender/blenkernel/intern/dynamicpaint.c') diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 2e1fa519284..b9279ace39f 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -588,7 +588,7 @@ static bool boundsIntersectDist(Bounds3D *b1, Bounds3D *b2, const float dist) } /* check whether bounds intersects a point with given radius */ -static bool boundIntersectPoint(Bounds3D *b, float point[3], const float radius) +static bool boundIntersectPoint(Bounds3D *b, const float point[3], const float radius) { if (!b->valid) { return false; @@ -4780,13 +4780,16 @@ static void dynamic_paint_paint_single_point_cb_ex(void *__restrict userdata, } } -static int dynamicPaint_paintSinglePoint(Depsgraph *depsgraph, - DynamicPaintSurface *surface, - float *pointCoord, - DynamicPaintBrushSettings *brush, - Object *brushOb, - Scene *scene, - float timescale) +static int dynamicPaint_paintSinglePoint( + Depsgraph *depsgraph, + DynamicPaintSurface *surface, + /* Cannot be const, because it is assigned to non-const variable. + * NOLINTNEXTLINE: readability-non-const-parameter. */ + float *pointCoord, + DynamicPaintBrushSettings *brush, + Object *brushOb, + Scene *scene, + float timescale) { PaintSurfaceData *sData = surface->data; float brush_radius = brush->paint_distance * surface->radius_scale; @@ -5456,11 +5459,14 @@ static void dynamic_paint_effect_drip_cb(void *__restrict userdata, } } -static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, - float *force, - PaintPoint *prevPoint, - float timescale, - float steps) +static void dynamicPaint_doEffectStep( + DynamicPaintSurface *surface, + /* Cannot be const, because it is assigned to non-const variable. + * NOLINTNEXTLINE: readability-non-const-parameter. */ + float *force, + PaintPoint *prevPoint, + float timescale, + float steps) { PaintSurfaceData *sData = surface->data; -- cgit v1.2.3