diff options
author | Chris Robinson <[email protected]> | 2018-11-19 09:51:29 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 09:51:29 -0800 |
commit | 3ae1c78d1ac07cd22727296488a399c48597fd15 (patch) | |
tree | 972c43d160cc7992c0d18fdc930512571853dd6d /OpenAL32 | |
parent | ddfed7187fad7c55ebb5eadb67108914ce22a57f (diff) |
Use std::isfinite instead of isfinite
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alListener.cpp | 12 | ||||
-rw-r--r-- | OpenAL32/alState.cpp | 7 |
2 files changed, 11 insertions, 8 deletions
diff --git a/OpenAL32/alListener.cpp b/OpenAL32/alListener.cpp index bf1ac3f9..d60f5254 100644 --- a/OpenAL32/alListener.cpp +++ b/OpenAL32/alListener.cpp @@ -20,6 +20,8 @@ #include "config.h" +#include <cmath> + #include "alMain.h" #include "alcontext.h" #include "alu.h" @@ -48,7 +50,7 @@ AL_API ALvoid AL_APIENTRY alListenerf(ALenum param, ALfloat value) switch(param) { case AL_GAIN: - if(!(value >= 0.0f && isfinite(value))) + if(!(value >= 0.0f && std::isfinite(value))) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Listener gain out of range"); listener->Gain = value; DO_UPDATEPROPS(); @@ -87,7 +89,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val switch(param) { case AL_POSITION: - if(!(isfinite(value1) && isfinite(value2) && isfinite(value3))) + if(!(std::isfinite(value1) && std::isfinite(value2) && std::isfinite(value3))) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Listener position out of range"); listener->Position[0] = value1; listener->Position[1] = value2; @@ -96,7 +98,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val break; case AL_VELOCITY: - if(!(isfinite(value1) && isfinite(value2) && isfinite(value3))) + if(!(std::isfinite(value1) && std::isfinite(value2) && std::isfinite(value3))) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Listener velocity out of range"); listener->Velocity[0] = value1; listener->Velocity[1] = value2; @@ -144,8 +146,8 @@ AL_API ALvoid AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values) switch(param) { case AL_ORIENTATION: - if(!(isfinite(values[0]) && isfinite(values[1]) && isfinite(values[2]) && - isfinite(values[3]) && isfinite(values[4]) && isfinite(values[5]))) + if(!(std::isfinite(values[0]) && std::isfinite(values[1]) && std::isfinite(values[2]) && + std::isfinite(values[3]) && std::isfinite(values[4]) && std::isfinite(values[5]))) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Listener orientation out of range"); /* AT then UP */ listener->Forward[0] = values[0]; diff --git a/OpenAL32/alState.cpp b/OpenAL32/alState.cpp index a3c3cc1f..e3e8856f 100644 --- a/OpenAL32/alState.cpp +++ b/OpenAL32/alState.cpp @@ -23,6 +23,7 @@ #include "version.h" #include <stdlib.h> +#include <cmath> #include "alMain.h" #include "alcontext.h" @@ -643,7 +644,7 @@ AL_API ALvoid AL_APIENTRY alDopplerFactor(ALfloat value) ContextRef context{GetContextRef()}; if(UNLIKELY(!context)) return; - if(!(value >= 0.0f && isfinite(value))) + if(!(value >= 0.0f && std::isfinite(value))) alSetError(context.get(), AL_INVALID_VALUE, "Doppler factor %f out of range", value); else { @@ -670,7 +671,7 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value) context->EventParam); } - if(!(value >= 0.0f && isfinite(value))) + if(!(value >= 0.0f && std::isfinite(value))) alSetError(context.get(), AL_INVALID_VALUE, "Doppler velocity %f out of range", value); else { @@ -685,7 +686,7 @@ AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat value) ContextRef context{GetContextRef()}; if(UNLIKELY(!context)) return; - if(!(value > 0.0f && isfinite(value))) + if(!(value > 0.0f && std::isfinite(value))) alSetError(context.get(), AL_INVALID_VALUE, "Speed of sound %f out of range", value); else { |