From 3d92926a902017e7cf1f5738e99ff62da596ce12 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Sun, 9 Aug 2026 15:02:21 +0400 Subject: refactor --- lib/apo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/apo.c') diff --git a/lib/apo.c b/lib/apo.c index f888162..fa720a7 100644 --- a/lib/apo.c +++ b/lib/apo.c @@ -20,7 +20,7 @@ ts_parameter_t const ts_apo_p = { .n_inputs = 1, .n_outputs = 1, .n_constants = uint_t ts_apo_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? (uint_t)((ts_apo_params_t *)c)->slow_k - 1 : 0 ); + return ( c ? (uint_t)((ts_apo_params_t const *)c)->slow_k - 1 : 0 ); } int ts_apo( @@ -31,10 +31,9 @@ int ts_apo( { TS_PROLOGUE( ts_apo_p ); if ( !c ) return -1; - if (n == 0) return -1; - fp_t fast_k = ((ts_apo_params_t *)c)->fast_k; - fp_t slow_k = ((ts_apo_params_t *)c)->slow_k; + fp_t fast_k = ((ts_apo_params_t const *)c)->fast_k; + fp_t slow_k = ((ts_apo_params_t const *)c)->slow_k; if (fast_k == 0 || slow_k == 0) return -1; fp_t fast_a = 1.0 / fast_k; -- cgit v1.3.1