Use switch rather than if-else in sink_input_pop_cb #13

justinzane opened this Issue Apr 4, 2013 · 1 comment

1 participant


In sink_input_pop_cb() (and in similar cases elsewhere), it would be
better to use a switch statement for handling the different cases of the
filter type instead of a series of "else ifs".
It is taking me a little while to remove the voice of some professor saying that "switch" "case" and "goto" were cardinal sins. I'm still getting a feel for the appropriate context for various c control flow mechanisms. Thanks.

@justinzane justinzane was assigned Apr 4, 2013

Moved filter logic to pulsecore/biquad-filter.c. Used switch there.

@justinzane justinzane closed this Apr 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment