[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v... |
Date: |
Mon, 02 Apr 2007 10:42:22 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 07/04/02 10:42:21
Modified files:
. : ChangeLog
server : as_value.cpp as_value.h
server/asobj : Date.cpp Math.cpp
Log message:
* server/as_value{.cpp, .h}: Declare NAN in the header
(and fix a typo in the declaration. Use that definition
instead of by using 0.0 / 0.0 to avoid compiler warnings.
* server/asobj/{Date.cpp, Math.cpp}: Don't redefine NAN.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2747&r2=1.2748
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.cpp?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Math.cpp?cvsroot=gnash&r1=1.20&r2=1.21
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2747
retrieving revision 1.2748
diff -u -b -r1.2747 -r1.2748
--- ChangeLog 2 Apr 2007 10:38:34 -0000 1.2747
+++ ChangeLog 2 Apr 2007 10:42:21 -0000 1.2748
@@ -1,3 +1,10 @@
+2007-04-02 Bastiaan Jacques <address@hidden>
+
+ * server/as_value{.cpp, .h}: Declare NAN in the header
+ (and fix a typo in the declaration. Use that definition
+ instead of by using 0.0 / 0.0 to avoid compiler warnings.
+ * server/asobj/{Date.cpp, Math.cpp}: Don't redefine NAN.
+
2007-04-02 Sandro Santilli <address@hidden>
* testsuite/misc-ming.all/ming_utils.{c,h}: fix compiler warnings.
Index: server/as_value.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- server/as_value.cpp 30 Mar 2007 07:23:19 -0000 1.33
+++ server/as_value.cpp 2 Apr 2007 10:42:21 -0000 1.34
@@ -32,7 +32,6 @@
#include "Boolean.h" // for automatic as_value::BOOLEAN => Boolean as object
#include "action.h" // for call_method0
-#include <cmath> // for NAN
#include <boost/algorithm/string/case_conv.hpp>
using namespace std;
@@ -43,12 +42,6 @@
namespace gnash {
-#ifndef NAN
-// If this makes your compiler die with div by zero,
-// use "static double zzzero = 0.0;" and "(zzzero/zzzero)"
-# define NAN std::numeric_limits<double>::quiet_NaN();
-#endif
-
//
// as_value -- ActionScript value type
//
Index: server/as_value.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- server/as_value.h 28 Mar 2007 08:46:43 -0000 1.39
+++ server/as_value.h 2 Apr 2007 10:42:21 -0000 1.40
@@ -14,7 +14,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.39 2007/03/28 08:46:43 bjacques Exp $ */
+/* $Id: as_value.h,v 1.40 2007/04/02 10:42:21 bjacques Exp $ */
#ifndef GNASH_AS_VALUE_H
#define GNASH_AS_VALUE_H
@@ -44,6 +44,11 @@
# endif
#endif
+#ifndef NAN
+# define NAN (std::numeric_limits<double>::quiet_NaN())
+#endif
+
+
#ifndef isnan
# define isnan(x) \
(sizeof (x) == sizeof (long double) ? isnan_ld (x) \
@@ -504,7 +509,7 @@
void set_sprite(const std::string& path);
void set_sprite(const sprite_instance& sp);
void set_int(int val) { set_double(val); }
- void set_nan() { double x = 0.0; set_double(x/x); }
+ void set_nan() { set_double(NAN); }
/// Make this value a NULL, OBJECT, MOVIECLIP or AS_FUNCTION value
//
Index: server/asobj/Date.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Date.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- server/asobj/Date.cpp 20 Mar 2007 15:01:20 -0000 1.37
+++ server/asobj/Date.cpp 2 Apr 2007 10:42:21 -0000 1.38
@@ -99,10 +99,6 @@
# include <sys/time.h>
#endif
-#ifndef NAN
- #define NAN (0.0/0.0)
-#endif
-
#ifndef trunc
#define trunc(x) ( x < 0 ? -(std::floor(-x)) : std::floor(x) )
#endif
Index: server/asobj/Math.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Math.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- server/asobj/Math.cpp 19 Mar 2007 17:11:14 -0000 1.20
+++ server/asobj/Math.cpp 2 Apr 2007 10:42:21 -0000 1.21
@@ -16,7 +16,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: Math.cpp,v 1.20 2007/03/19 17:11:14 bjacques Exp $ */
+/* $Id: Math.cpp,v 1.21 2007/04/02 10:42:21 bjacques Exp $ */
//
// This file implements methods of the ActionScript Math class.
@@ -40,12 +40,6 @@
#include "log.h"
#include "builtin_function.h"
-#ifndef NAN
-// This throws a warning with some compilers. If that bugs you, use
-// static double nan_zero = 0.0; and (nan_zero/nan_zero)
-# define NAN (0.0/0.0)
-#endif
-
using namespace std;
namespace gnash {
- [Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...,
Bastiaan Jacques <=