resid: fix deprecated-enum-float-conversion warnings
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
Just a couple of explicit casts to fix a warning when compiling in c++20 mode
../../../vice-git/src/resid/sid.cc: In member function ‘bool reSID::SID::set_sampling_parameters(double, reSID::sampling_method, double, double, double)’:
../../../vice-git/src/resid/sid.cc:591:14: warning: arithmetic between enumeration type ‘reSID::SID::<unnamed enum>’ and floating-point type ‘double’ is deprecated [-Wdeprecated-enum-float-conversion]
591 | if (FIR_N*clock_freq/sample_freq >= RINGSIZE) {
| ~~~~~^~~~~~~~~~~
../../../vice-git/src/resid/sid.cc:591:38: warning: comparison of floating-point type ‘double’ with enumeration type ‘reSID::SID::<unnamed enum>’ is deprecated [-Wdeprecated-enum-float-conversion]
591 | if (FIR_N*clock_freq/sample_freq >= RINGSIZE) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
BTW, I see VICE now requires c++11, is that true for resid too?
It would be even better replacing that enum values with constexpr definitions maybe.
If you feel that you need to use C++11 in reSID, just do it :)
applied in r45315 - thanks!