diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-04 04:44:56 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-04 04:44:56 +0300 |
commit | f4a9a3767ee2f5c34c8f8fa6e4dc89232bb3dcd6 (patch) | |
tree | 4d6571f2a56bce840d6d6a85c3a27771adbf3e6a /source/blender/blenkernel/BKE_curves.hh | |
parent | e86c2f7288724bd6fec33ff43e89816d7520a2b3 (diff) |
Cleanup: Rename curve segment count function
`curve_segment_num` -> `segments_num`.
The "curve" prefix is reduntant for a function in the curve namespace.
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 2bebd3ff97d..b1f096b1c39 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -423,7 +423,7 @@ namespace curves { * The number of segments between control points, accounting for the last segment of cyclic * curves. The logic is simple, but this function should be used to make intentions clearer. */ -inline int curve_segment_num(const int points_num, const bool cyclic) +inline int segments_num(const int points_num, const bool cyclic) { BLI_assert(points_num > 0); return (cyclic && points_num > 1) ? points_num : points_num - 1; @@ -782,7 +782,7 @@ inline IndexRange CurvesGeometry::lengths_range_for_curve(const int curve_index, BLI_assert(cyclic == this->cyclic()[curve_index]); const IndexRange points = this->evaluated_points_for_curve(curve_index); const int start = points.start() + curve_index; - return {start, curves::curve_segment_num(points.size(), cyclic)}; + return {start, curves::segments_num(points.size(), cyclic)}; } inline Span<float> CurvesGeometry::evaluated_lengths_for_curve(const int curve_index, |