From 501d2443d03cce18985fab3ffad5d23238748f3e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 Jun 2021 16:37:14 +1000 Subject: Cleanup: use const arguments for accessor functions --- source/blender/blenkernel/intern/fcurve.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/blender/blenkernel/intern/fcurve.c') diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 18dac2fb679..7fe7b38e120 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -510,8 +510,11 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C, * with optional argument for precision required. * Returns the index to insert at (data already at that index will be offset if replace is 0) */ -static int BKE_fcurve_bezt_binarysearch_index_ex( - BezTriple array[], float frame, int arraylen, float threshold, bool *r_replace) +static int BKE_fcurve_bezt_binarysearch_index_ex(const BezTriple array[], + const float frame, + const int arraylen, + const float threshold, + bool *r_replace) { int start = 0, end = arraylen; int loopbreaker = 0, maxloop = arraylen * 2; @@ -597,9 +600,9 @@ static int BKE_fcurve_bezt_binarysearch_index_ex( /* Binary search algorithm for finding where to insert BezTriple. (for use by insert_bezt_fcurve) * Returns the index to insert at (data already at that index will be offset if replace is 0) */ -int BKE_fcurve_bezt_binarysearch_index(BezTriple array[], - float frame, - int arraylen, +int BKE_fcurve_bezt_binarysearch_index(const BezTriple array[], + const float frame, + const int arraylen, bool *r_replace) { /* This is just a wrapper which uses the default threshold. */ -- cgit v1.2.3