Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsgain.cpp: use C++ cmath #140

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Conversation

barracuda156
Copy link
Contributor

Current code uses C99 header and isfinite in C++ file, which fails to compile on some configs. Fix that.

@barracuda156
Copy link
Contributor Author

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_rsgain/rsgain/work/rsgain-3.5.3/src/rsgain.cpp: In function 'bool parse_max_peak_level(const char*, double&)':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_rsgain/rsgain/work/rsgain-3.5.3/src/rsgain.cpp:153:27: error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
  153 |     if (rest == value || !isfinite(max_peak)) {
      |                           ^~~~~~~~
      |                           std::isfinite
In file included from /opt/local/include/LegacySupport/cmath:54,
                 from /opt/local/include/libfmt9/fmt/chrono.h:13,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_rsgain/rsgain/work/rsgain-3.5.3/src/output.hpp:66,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_rsgain/rsgain/work/rsgain-3.5.3/src/rsgain.cpp:58:
/opt/local/include/gcc14/c++/cmath:1142:5: note: 'std::isfinite' declared here
 1142 |     isfinite(_Tp)
      |     ^~~~~~~~
make[2]: *** [src/CMakeFiles/rsgain.dir/rsgain.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

@complexlogic complexlogic merged commit 20eb85e into complexlogic:master Dec 7, 2024
3 of 5 checks passed
@barracuda156 barracuda156 deleted the cmath branch December 7, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants