mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-24 15:03:53 +02:00
Use std::isinf() instead of isinf()
Audacity fails to build on Ubuntu 16.04 with g++ 5.3.1 (using C++11), because isinf() is not defined. Thus use std::isinf() instead.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include "../widgets/NumericTextCtrl.h"
|
||||
#include "FileDialog.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#if defined(__WXMSW__) && !defined(__CYGWIN__)
|
||||
@@ -58,6 +58,8 @@
|
||||
#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.
|
||||
|
||||
using std::isinf;
|
||||
|
||||
bool ContrastDialog::GetDB(float &dB)
|
||||
{
|
||||
float rms = float(0.0);
|
||||
|
||||
@@ -27,8 +27,8 @@ effects from this one class.
|
||||
#include "../../Audacity.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <wx/checkbox.h>
|
||||
@@ -683,7 +683,7 @@ bool NyquistEffect::Process()
|
||||
// with very small values, bandwidth calculation may be inf.
|
||||
// (Observed on Linux)
|
||||
double bw = log(mF1 / mF0) / log(2.0);
|
||||
if (!isinf(bw)) {
|
||||
if (!std::isinf(bw)) {
|
||||
bandwidth.Printf(wxT("(float %s)"), Internat::ToString(bw).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user