berndporr / iir1

DSP IIR realtime filter library written in C++
http://berndporr.github.io/iir1/
MIT License
627 stars 137 forks source link

Fixing compiler warnings #23

Closed sven-herrmann closed 3 years ago

sven-herrmann commented 3 years ago

Now this one might be a bit more controversial.

I am compiling with many warnings enabled and had to make the submitted changes to fix those.

They were mainly related to signed integers for size specifications in the template parameters.

Additionally, Layout.h was missing the #include "Types.h" and the default initialization of m_normalW.

Finally, I replaced the c-style cast from Sample -> double in RBJ.h.

berndporr commented 3 years ago

This is a mix of API changes which will break existing usage by other users with cosmetic changes. Also there are commits which affect only a single line but the diff is the whole file. Generally I follow any warnings generated by "-Wall -Wconversion -Wextra -pedantic" and that's the standard here as defined in the CMakeList.txt. int stays int here as many people just use int and never unsigned. Also in general I can only reject PR where the whole file is the diff and not the line affected. Also PR which are a mix of cosmetic changes and those which change the API can obv not be accepted. They need to be properly discussed. Thanks for the uninit variable which I've fixed.