From 3d92926a902017e7cf1f5738e99ff62da596ce12 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Sun, 9 Aug 2026 15:02:21 +0400 Subject: refactor --- lib/stochastic_momentum_index.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stochastic_momentum_index.c') diff --git a/lib/stochastic_momentum_index.c b/lib/stochastic_momentum_index.c index 5491c30..35af230 100644 --- a/lib/stochastic_momentum_index.c +++ b/lib/stochastic_momentum_index.c @@ -26,7 +26,7 @@ ts_parameter_t const ts_stochastic_momentum_index_p = { .n_inputs = 4, .n_output uint_t ts_stochastic_momentum_index_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? ((ts_stochastic_momentum_index_params_t *)c)->k1 + ((ts_stochastic_momentum_index_params_t *)c)->k2 : 0 ); + return ( c ? ((ts_stochastic_momentum_index_params_t const *)c)->k1 + ((ts_stochastic_momentum_index_params_t const *)c)->k2 : 0 ); } int ts_stochastic_momentum_index( @@ -37,9 +37,9 @@ int ts_stochastic_momentum_index( { TS_PROLOGUE( ts_stochastic_momentum_index_p ); if ( !c ) return -1; - uint_t k1 = ((ts_stochastic_momentum_index_params_t *)c)->k1; - uint_t k2 = ((ts_stochastic_momentum_index_params_t *)c)->k2; - uint_t signal_period = ((ts_stochastic_momentum_index_params_t *)c)->signal_period; + uint_t k1 = ((ts_stochastic_momentum_index_params_t const *)c)->k1; + uint_t k2 = ((ts_stochastic_momentum_index_params_t const *)c)->k2; + uint_t signal_period = ((ts_stochastic_momentum_index_params_t const *)c)->signal_period; if (k1 == 0 || k2 == 0) return -1; fp_t *midpoint = calloc(n, sizeof(fp_t)); -- cgit v1.3.1