mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
Fix redeclaration of isinf()
Commit 9e78a41 declared isinf() as std::isinf(), because isinf() was not declared on Ubuntu 16.04. But now the builds fail on Ubuntu <= 15.10, because isinf() is declared there: effects/Contrast.cpp:61:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration using std::isinf; ^ In file included from /usr/include/features.h:364:0, from /usr/include/assert.h:35, from /usr/include/wx-3.0/wx/debug.h:14, from /usr/include/wx-3.0/wx/defs.h:695, from /usr/include/wx-3.0/wx/event.h:14, from /usr/include/wx-3.0/wx/window.h:18, from /usr/include/wx-3.0/wx/nonownedwnd.h:14, from /usr/include/wx-3.0/wx/toplevel.h:20, from /usr/include/wx-3.0/wx/dialog.h:14, from effects/Contrast.h:12, from effects/Contrast.cpp:13: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:201:1: note: previous declaration ‘int isinf(double)’ __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); Thus use std::isinf() directly instead of declaring isinf() as std::isinf().
This commit is contained in:
parent
a4b98d4997
commit
a20d7898f3
@ -58,8 +58,6 @@
|
|||||||
#define DB_MAX_LIMIT 0.0 // TODO: We should probably fail WCAG2 if audio is massively distorted.
|
#define DB_MAX_LIMIT 0.0 // TODO: We should probably fail WCAG2 if audio is massively distorted.
|
||||||
#define WCAG2_PASS 20.0 // dB difference required to pass WCAG2 test.
|
#define WCAG2_PASS 20.0 // dB difference required to pass WCAG2 test.
|
||||||
|
|
||||||
using std::isinf;
|
|
||||||
|
|
||||||
bool ContrastDialog::GetDB(float &dB)
|
bool ContrastDialog::GetDB(float &dB)
|
||||||
{
|
{
|
||||||
float rms = float(0.0);
|
float rms = float(0.0);
|
||||||
@ -423,7 +421,7 @@ void ContrastDialog::results()
|
|||||||
// TODO: We check for absolute silence here, so should not need to check again later in ::results()
|
// TODO: We check for absolute silence here, so should not need to check again later in ::results()
|
||||||
if (mForegroundIsDefined) {
|
if (mForegroundIsDefined) {
|
||||||
mForegroundRMSText->SetName(_("Measured foreground level")); // Read by screen-readers
|
mForegroundRMSText->SetName(_("Measured foreground level")); // Read by screen-readers
|
||||||
if(isinf(- foregrounddB))
|
if(std::isinf(- foregrounddB))
|
||||||
mForegroundRMSText->ChangeValue(wxString::Format(_("zero")));
|
mForegroundRMSText->ChangeValue(wxString::Format(_("zero")));
|
||||||
else
|
else
|
||||||
mForegroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), foregrounddB)); // i18n-hint: short form of 'decibels'
|
mForegroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), foregrounddB)); // i18n-hint: short form of 'decibels'
|
||||||
@ -435,7 +433,7 @@ void ContrastDialog::results()
|
|||||||
|
|
||||||
if (mBackgroundIsDefined) {
|
if (mBackgroundIsDefined) {
|
||||||
mBackgroundRMSText->SetName(_("Measured background level"));
|
mBackgroundRMSText->SetName(_("Measured background level"));
|
||||||
if(isinf(- backgrounddB))
|
if(std::isinf(- backgrounddB))
|
||||||
mBackgroundRMSText->ChangeValue(wxString::Format(_("zero")));
|
mBackgroundRMSText->ChangeValue(wxString::Format(_("zero")));
|
||||||
else
|
else
|
||||||
mBackgroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), backgrounddB));
|
mBackgroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), backgrounddB));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user