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:56:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-07 15:56:13 +0300
commit48e089375ebe4aeb30d60e9d8ef6f467280cf07d (patch)
treeaf4675f9b8489fb49b68a9a9d977a098e645f640 /source/blender/blenlib
parentb134434224254d4ac3fc73d023f2f6d914746690 (diff)
Cleanup: pass arrays const where possible
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/math_geom.c4
-rw-r--r--source/blender/blenlib/intern/voronoi_2d.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index eff58f305d2..7717c2f26ff 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -3418,7 +3418,7 @@ static bool point_in_slice(const float p[3],
/* adult sister defining the slice planes by the origin and the normal
* NOTE |normal| may not be 1 but defining the thickness of the slice */
-static bool point_in_slice_as(float p[3], float origin[3], float normal[3])
+static bool point_in_slice_as(const float p[3], const float origin[3], const float normal[3])
{
float h, rp[3];
sub_v3_v3v3(rp, p, origin);
@@ -4910,7 +4910,7 @@ void projmat_from_subregion(const float projmat[4][4],
}
}
-static void i_multmatrix(float icand[4][4], float Vm[4][4])
+static void i_multmatrix(const float icand[4][4], float Vm[4][4])
{
int row, col;
float temp[4][4];
diff --git a/source/blender/blenlib/intern/voronoi_2d.c b/source/blender/blenlib/intern/voronoi_2d.c
index bc11a2c7a1c..5b998973a20 100644
--- a/source/blender/blenlib/intern/voronoi_2d.c
+++ b/source/blender/blenlib/intern/voronoi_2d.c
@@ -83,7 +83,9 @@ static void voronoi_insertEvent(VoronoiProcess *process, VoronoiEvent *event)
}
/* edge */
-static VoronoiEdge *voronoiEdge_new(float start[2], float left[2], float right[2])
+static VoronoiEdge *voronoiEdge_new(const float start[2],
+ const float left[2],
+ const float right[2])
{
VoronoiEdge *edge = MEM_callocN(sizeof(VoronoiEdge), "voronoi edge");
@@ -118,7 +120,7 @@ static VoronoiParabola *voronoiParabola_new(void)
return parabola;
}
-static VoronoiParabola *voronoiParabola_newSite(float site[2])
+static VoronoiParabola *voronoiParabola_newSite(const float site[2])
{
VoronoiParabola *parabola = MEM_callocN(sizeof(VoronoiParabola), "voronoi parabola site");