gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server/asobj Date.cpp


From: Martin Guy
Subject: [Gnash-commit] gnash/server/asobj Date.cpp
Date: Sat, 03 Mar 2007 12:05:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Martin Guy <martinwguy> 07/03/03 12:05:44

Modified files:
        server/asobj   : Date.cpp 

Log message:
        Fix compiler warning re possible uninit var; improve commantary

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Date.cpp?cvsroot=gnash&r1=1.30&r2=1.31

Patches:
Index: Date.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Date.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- Date.cpp    28 Feb 2007 14:46:12 -0000      1.30
+++ Date.cpp    3 Mar 2007 12:05:44 -0000       1.31
@@ -1188,9 +1188,13 @@
 // returns 0.0 if there are none, 
 static double
 rogue_date_args(const fn_call& fn) {
+       // Two flags: Did we find any +Infinity (or -Infinity) values in the
+       // argument list? If so, "infinity" must be set to the kind that we
+       // found.
        int plusinf_present = 0;
        int minusinf_present = 0;
-       double infinity;        // The kind of infinity we found
+       double infinity = 0.0;  // The kind of infinity we found.
+                               // 0.0 == none yet.
 
        for (int i = 0; i < fn.nargs; i++) {
                double arg = fn.arg(i).to_number();




reply via email to

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