mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 15:50:05 +02:00
Use portable wxIsNaN() instead of isnan()
isnan() is not defined when compiling with g++ 5.3.1 on Ubuntu 16.04. It is called std::isnan() in C++11 instead. Therefore use wxIsNaN() instead which already defines the correct name.
This commit is contained in:
parent
8d4ef6054a
commit
13630dc91d
@ -13,17 +13,12 @@
|
||||
|
||||
#if defined(USE_LV2)
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include <float.h>
|
||||
#define isfinite _finite
|
||||
#define isnan _isnan
|
||||
#endif
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/dcbuffer.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/dynarray.h>
|
||||
#include <wx/math.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
@ -562,13 +557,13 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
|
||||
lilv_scale_points_free(points);
|
||||
|
||||
// Collect the value and range info
|
||||
ctrl.mHasLo = !isnan(minimumVals[i]);
|
||||
ctrl.mHasHi = !isnan(maximumVals[i]);
|
||||
ctrl.mHasLo = !wxIsNaN(minimumVals[i]);
|
||||
ctrl.mHasHi = !wxIsNaN(maximumVals[i]);
|
||||
ctrl.mMin = ctrl.mHasLo ? minimumVals[i] : 0.0;
|
||||
ctrl.mMax = ctrl.mHasHi ? maximumVals[i] : 1.0;
|
||||
ctrl.mLo = ctrl.mMin;
|
||||
ctrl.mHi = ctrl.mMax;
|
||||
ctrl.mDef = !isnan(defaultValues[i]) ?
|
||||
ctrl.mDef = !wxIsNaN(defaultValues[i]) ?
|
||||
defaultValues[i] :
|
||||
ctrl.mHasLo ?
|
||||
ctrl.mLo :
|
||||
|
Loading…
x
Reference in New Issue
Block a user