diff options
| author | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
|---|---|---|
| committer | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
| commit | 3d92926a902017e7cf1f5738e99ff62da596ce12 (patch) | |
| tree | 2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/supertrend.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
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 ); |