gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/as_value.h


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog server/as_value.h
Date: Tue, 04 Mar 2008 09:09:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     08/03/04 09:09:07

Modified files:
        .              : ChangeLog 
        server         : as_value.h 

Log message:
        Use the previous implementations of isnan and isinf, because the current
        one is reported not to work in all cases.  isinf can now be a macro 
since
        it inherits type-safety from isnan.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5792&r2=1.5793
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.85&r2=1.86

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5792
retrieving revision 1.5793
diff -u -b -r1.5792 -r1.5793
--- ChangeLog   4 Mar 2008 03:48:01 -0000       1.5792
+++ ChangeLog   4 Mar 2008 09:09:06 -0000       1.5793
@@ -1,3 +1,9 @@
+2008-03-04 Bastiaan Jacques <address@hidden>
+
+       * server/as_value.h: Use the previous implementations of isnan and
+       isinf, because the current one is reported not to work in all cases.
+       isinf can now be a macro since it inherits type-safety from isnan.
+
 2008-03-03 Bastiaan Jacques <address@hidden>
 
        * server/as_value.h: Replace isnan and isinf macros with type safe

Index: server/as_value.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.h,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- server/as_value.h   4 Mar 2008 03:48:02 -0000       1.85
+++ server/as_value.h   4 Mar 2008 09:09:07 -0000       1.86
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: as_value.h,v 1.85 2008/03/04 03:48:02 bjacques Exp $ */
+/* $Id: as_value.h,v 1.86 2008/03/04 09:09:07 bjacques Exp $ */
 
 #ifndef GNASH_AS_VALUE_H
 #define GNASH_AS_VALUE_H
@@ -63,31 +63,18 @@
 #endif
 
 
-// The following two templates work just like their C counterparts, with added
+// The following template works just like its C counterpart, with added
 // type safety (i.e., they will only compile for floating point arguments).
 
 template <typename T>
-bool
+inline bool
 isnan(const T& num, typename boost::enable_if<boost::is_floating_point<T> 
>::type* dummy = 0)
 {
        UNUSED(dummy);
-
-       BOOST_STATIC_ASSERT(std::numeric_limits<T>::has_quiet_NaN);
-
-       return num == std::numeric_limits<T>::quiet_NaN();
+       return num != num;
 }
 
-
-template <typename T>
-bool
-isinf(const T& num, typename boost::enable_if<boost::is_floating_point<T> 
>::type* dummy = 0)
-{
-       UNUSED(dummy);
-
-       BOOST_STATIC_ASSERT(std::numeric_limits<T>::has_infinity);
-
-       return num == std::numeric_limits<T>::infinity();
-}
+#define isinf(x) (isnan(x - x))
 
 /// Use this methods to obtain a properly-formatted property name
 /// The methods will convert the name to lowercase if the current VM target




reply via email to

[Prev in Thread] Current Thread [Next in Thread]