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:
authorHans Goudey <h.goudey@me.com>2021-10-04 02:31:56 +0300
committerHans Goudey <h.goudey@me.com>2021-10-04 02:31:56 +0300
commit272a38e0c264911d6ebafcb440432d20c1495604 (patch)
treed5f12f56b0a331d4148876bef24cb7275ef044fc
parentc9af025936e8c660d5dbad86a6554a13e72d0457 (diff)
Cleanup: Make function static
-rw-r--r--source/blender/blenkernel/BKE_curveprofile.h3
-rw-r--r--source/blender/blenkernel/intern/curveprofile.cc6
2 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_curveprofile.h b/source/blender/blenkernel/BKE_curveprofile.h
index 501ae70ecdb..88bac220eb3 100644
--- a/source/blender/blenkernel/BKE_curveprofile.h
+++ b/source/blender/blenkernel/BKE_curveprofile.h
@@ -85,9 +85,6 @@ enum {
};
void BKE_curveprofile_update(struct CurveProfile *profile, const int update_flags);
-/* Need to find the total length of the curve to sample a portion of it */
-float BKE_curveprofile_total_length(const struct CurveProfile *profile);
-
void BKE_curveprofile_create_samples_even_spacing(struct CurveProfile *profile,
int n_segments,
struct CurveProfilePoint *r_samples);
diff --git a/source/blender/blenkernel/intern/curveprofile.cc b/source/blender/blenkernel/intern/curveprofile.cc
index c16459afbb3..282aa04e0fa 100644
--- a/source/blender/blenkernel/intern/curveprofile.cc
+++ b/source/blender/blenkernel/intern/curveprofile.cc
@@ -1022,7 +1022,7 @@ static float curveprofile_distance_to_next_table_point(const CurveProfile *profi
*
* \note Requires #BKE_curveprofile_init or #BKE_curveprofile_update call before to fill table.
*/
-float BKE_curveprofile_total_length(const CurveProfile *profile)
+static float curveprofile_total_length(const CurveProfile *profile)
{
float total_length = 0;
for (int i = 0; i < PROF_TABLE_LEN(profile->path_len) - 1; i++) {
@@ -1043,7 +1043,7 @@ void BKE_curveprofile_create_samples_even_spacing(CurveProfile *profile,
int n_segments,
CurveProfilePoint *r_samples)
{
- const float total_length = BKE_curveprofile_total_length(profile);
+ const float total_length = curveprofile_total_length(profile);
const float segment_length = total_length / n_segments;
float distance_to_next_table_point = curveprofile_distance_to_next_table_point(profile, 0);
float distance_to_previous_table_point = 0.0f;
@@ -1101,7 +1101,7 @@ void BKE_curveprofile_evaluate_length_portion(const CurveProfile *profile,
float *x_out,
float *y_out)
{
- const float total_length = BKE_curveprofile_total_length(profile);
+ const float total_length = curveprofile_total_length(profile);
const float requested_length = length_portion * total_length;
/* Find the last point along the path with a lower length portion than the input. */