diff options
Diffstat (limited to 'lib/supertrend.c')
| -rw-r--r-- | lib/supertrend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/supertrend.c b/lib/supertrend.c index 4487e96..c062805 100644 --- a/lib/supertrend.c +++ b/lib/supertrend.c @@ -24,7 +24,7 @@ ts_parameter_t const ts_supertrend_p = { .n_inputs = 4, .n_outputs = 2, .n_const uint_t ts_supertrend_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? ((ts_supertrend_params_t *)c)->k : 0 ); + return ( c ? ((ts_supertrend_params_t const *)c)->k : 0 ); } int ts_supertrend( @@ -36,8 +36,8 @@ int ts_supertrend( TS_PROLOGUE( ts_supertrend_p ); if ( !c ) return -1; TS_CHECK_INPUT(x, x_n, n); - uint_t k = ((ts_supertrend_params_t *)c)->k; - fp_t mult = ((ts_supertrend_params_t *)c)->mult; + uint_t k = ((ts_supertrend_params_t const *)c)->k; + fp_t mult = ((ts_supertrend_params_t const *)c)->mult; if (k == 0 || n <= k) return -1; fp_t tr = ts_h( x, 1 ) - ts_l( x, 1 ); |