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:
authorCampbell Barton <ideasman42@gmail.com>2020-08-07 15:36:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-07 15:37:39 +0300
commitb134434224254d4ac3fc73d023f2f6d914746690 (patch)
treeb67d2c5aee982495d55848414c362665a37476b0 /source/blender/blenlib
parent3db67fd670535c0a709ec6e8204fcb730cd3eb0d (diff)
Cleanup: declare arrays arrays where possible
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/lasso_2d.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c4
-rw-r--r--source/blender/blenlib/intern/math_interp.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/lasso_2d.c b/source/blender/blenlib/intern/lasso_2d.c
index f2cc8d42de7..a3b111cf0f2 100644
--- a/source/blender/blenlib/intern/lasso_2d.c
+++ b/source/blender/blenlib/intern/lasso_2d.c
@@ -61,7 +61,7 @@ bool BLI_lasso_is_point_inside(const int mcoords[][2],
return false;
}
- int pt[2] = {sx, sy};
+ const int pt[2] = {sx, sy};
return isect_point_poly_v2_int(pt, mcoords, mcoords_len, true);
}
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index ce83b522178..eff58f305d2 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -2094,7 +2094,7 @@ bool isect_ray_seg_v2(const float ray_origin[2],
det = cross_v2v2(ray_direction, s10);
if (det != 0.0f) {
const float v = cross_v2v2(v0_local, v1_local);
- float p[2] = {(ray_direction[0] * v) / det, (ray_direction[1] * v) / det};
+ const float p[2] = {(ray_direction[0] * v) / det, (ray_direction[1] * v) / det};
const float t = (dot_v2v2(p, ray_direction) / dot_v2v2(ray_direction, ray_direction));
if ((t >= 0.0f) == 0) {
@@ -5106,7 +5106,7 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f
void map_to_plane_v2_v3v3(float r_co[2], const float co[3], const float no[3])
{
- float target[3] = {0.0f, 0.0f, 1.0f};
+ const float target[3] = {0.0f, 0.0f, 1.0f};
float axis[3];
cross_v3_v3v3(axis, no, target);
diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c
index 6277b1cd9dc..13a1816f1bd 100644
--- a/source/blender/blenlib/intern/math_interp.c
+++ b/source/blender/blenlib/intern/math_interp.c
@@ -286,7 +286,7 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer,
if (float_output) {
const float *row1, *row2, *row3, *row4;
- float empty[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ const float empty[4] = {0.0f, 0.0f, 0.0f, 0.0f};
/* pixel value must be already wrapped, however values at boundaries may flip */
if (wrap_x) {