diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-13 12:27:09 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-13 12:27:09 +0300 |
commit | 725973485a909c2b732c58bd49d06a75edd52f7e (patch) | |
tree | 890e8f6772c7ecaf98121390aff33d321e35c6a4 /source/blender/blenlib/intern/voxel.c | |
parent | a19584a4715444721f8f625f0b5481e67c0d97ae (diff) |
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
Diffstat (limited to 'source/blender/blenlib/intern/voxel.c')
-rw-r--r-- | source/blender/blenlib/intern/voxel.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c index c7c794957c2..2c8eb9f5a13 100644 --- a/source/blender/blenlib/intern/voxel.c +++ b/source/blender/blenlib/intern/voxel.c @@ -26,7 +26,7 @@ #include "BLI_strict_flags.h" -BLI_INLINE float D(float *data, const int res[3], int x, int y, int z) +BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z) { CLAMP(x, 0, res[0] - 1); CLAMP(y, 0, res[1] - 1); @@ -36,7 +36,7 @@ BLI_INLINE float D(float *data, const int res[3], int x, int y, int z) /* *** nearest neighbor *** */ /* input coordinates must be in bounding box 0.0 - 1.0 */ -float BLI_voxel_sample_nearest(float *data, const int res[3], const float co[3]) +float BLI_voxel_sample_nearest(const float *data, const int res[3], const float co[3]) { int xi, yi, zi; @@ -65,7 +65,7 @@ BLI_INLINE int64_t _clamp(int a, int b, int c) return (a < b) ? b : ((a > c) ? c : a); } -float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3]) +float BLI_voxel_sample_trilinear(const float *data, const int res[3], const float co[3]) { if (data) { @@ -106,7 +106,7 @@ float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3 return 0.f; } -float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3]) +float BLI_voxel_sample_triquadratic(const float *data, const int res[3], const float co[3]) { if (data) { @@ -161,7 +161,10 @@ float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float c return 0.f; } -float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline) +float BLI_voxel_sample_tricubic(const float *data, + const int res[3], + const float co[3], + int bspline) { if (data) { |