Finally, this should really fix the msvc and old ubuntu compiler problems with NAN...
authorJoerg Mueller <nexyon@gmail.com>
Sat, 20 Mar 2010 23:36:08 +0000 (23:36 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Sat, 20 Mar 2010 23:36:08 +0000 (23:36 +0000)
source/blender/blenlib/BLI_math_base.h
source/blender/editors/screen/screen_ops.c

index cf3fda8..b080aa6 100644 (file)
@@ -70,8 +70,8 @@ extern "C" {
 #define M_LN10          2.30258509299404568402
 #endif
 #ifndef NAN
-static __const char __qnan__[8] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
-#define        NAN                 (*(__const double *) __qnan__)
+static const unsigned long __qnan__ = 0x7fc00000UL;
+#define NAN                 ((const float) __qnan__)
 #endif
 
 #ifndef sqrtf
@@ -124,7 +124,6 @@ static __const char __qnan__[8] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
 #ifndef FREE_WINDOWS
 #define isnan(n) _isnan(n)
 #define finite _finite
-#define isfinite(n) _finite(n)
 #endif
 #endif
 
index 969b88e..31df55b 100644 (file)
@@ -2411,7 +2411,7 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
                if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE))
                        time = sound_sync_scene(scene);
 
-               if(isfinite(time))
+               if(finite(time))
                        scene->r.cfra = floor(time * FPS);
                else
                {