isfinite etc.. is now properly defined as a macro
This was SVN commit r4288.
This commit is contained in:
parent
0ffabbc5dc
commit
12b060d34f
@ -1822,10 +1822,10 @@ static void vsrc_latch(VSrc * vs)
|
||||
#ifndef NDEBUG
|
||||
// paranoid value checking; helps determine which parameter is
|
||||
// the problem when the below AL_CHECK fails.
|
||||
debug_assert(!std::isnan(vs->pos[0]) && !std::isnan(vs->pos[1]) && !std::isnan(vs->pos[2]));
|
||||
debug_assert(!isnan(vs->pos[0]) && !isnan(vs->pos[1]) && !isnan(vs->pos[2]));
|
||||
debug_assert(vs->relative == AL_TRUE || vs->relative == AL_FALSE);
|
||||
debug_assert(!std::isnan(vs->gain));
|
||||
debug_assert(!std::isnan(vs->pitch) && vs->pitch > 0.0f);
|
||||
debug_assert(!isnan(vs->gain));
|
||||
debug_assert(!isnan(vs->pitch) && vs->pitch > 0.0f);
|
||||
debug_assert(vs->loop == AL_TRUE || vs->loop == AL_FALSE);
|
||||
#endif
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "lib/config.h"
|
||||
#include "lib/debug.h" // ErrorReaction
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// some functions among the sysdep API are implemented as macros
|
||||
// that redirect to the platform-dependent version. this is done where
|
||||
@ -150,6 +150,9 @@ extern void* alloca(size_t size);
|
||||
// it doesn't already exist.
|
||||
# ifndef isfinite
|
||||
# define isfinite std::isfinite
|
||||
# define isnan std::isnan
|
||||
# define isinf std::isinf
|
||||
# define isnormal std::isnormal
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -151,7 +151,7 @@ template<> jsval ToJSVal<double>( double& Native )
|
||||
template<> bool ToPrimitive<double>( JSContext* cx, jsval v, double& Storage )
|
||||
{
|
||||
JSBool ok = JS_ValueToNumber(cx, v, &Storage);
|
||||
if (ok == JS_FALSE || !std::isfinite( Storage ) )
|
||||
if (ok == JS_FALSE || !isfinite( Storage ) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user