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 server/cxform...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog server/as_value.h server/cxform...
Date: Fri, 06 Jun 2008 10:51:41 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/06/06 10:51:41

Modified files:
        .              : ChangeLog 
        server         : as_value.h cxform.h event_id.h shape.h types.h 
        libbase        : GnashException.h tu_file.cpp tu_file.h 
                         utility.h 
        libgeometry    : Point2d.h Range2d.h 
        plugin         : Makefile.am 
        plugin/win32   : Makefile.am 
        macros         : firefox.m4 

Log message:
                * libbase/utility.h: include gnashconfig.h, fix some old-style 
casts,
                  use Dossy's 0.8.3 branch solution for isfinite on win32 in 
HEAD
                  too.
                * libbase/tu_file.{cpp,h}: fix old-style casts, add some 
indentation.
                * libgeometry/Point2d.h: old-style casts, std:: mathematic 
functions.
                * libgeometry/Range2d.h: ditto.
                * server/cxform.h, server/types.h, server/shape.h, 
server/event_id.h,
                  server/as_value.h: old-style casts.
                * configure.ac: drop tests for hash map extensions, add -ansi to
                  standard CXXFLAGS (this simply disables gcc extensions, so 
there
                  should be (and are) no problems building). Add extra warnings 
to
                  standard CXXFLAGS. Replace NSAPI with NPAPI.
                * macros/firefox.m4: replace $nsapi with $npapi.
                * plugins/Makefile.am, plugins/win32/Makefile.am, Makefile.am:
                  NSAPI->NPAPI.
                * GnashException.h: header guard used reserved identifier.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6834&r2=1.6835
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.94&r2=1.95
http://cvs.savannah.gnu.org/viewcvs/gnash/server/cxform.h?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/server/event_id.h?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape.h?cvsroot=gnash&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/gnash/server/types.h?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/GnashException.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_file.cpp?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_file.h?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/utility.h?cvsroot=gnash&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/Point2d.h?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/Range2d.h?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/Makefile.am?cvsroot=gnash&r1=1.76&r2=1.77
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/win32/Makefile.am?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/firefox.m4?cvsroot=gnash&r1=1.32&r2=1.33

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6834
retrieving revision 1.6835
diff -u -b -r1.6834 -r1.6835
--- ChangeLog   6 Jun 2008 10:19:57 -0000       1.6834
+++ ChangeLog   6 Jun 2008 10:51:39 -0000       1.6835
@@ -1,3 +1,22 @@
+2008-06-06 Benjamin Wolsey <address@hidden>
+
+       * libbase/utility.h: include gnashconfig.h, fix some old-style casts,
+         use Dossy's 0.8.3 branch solution for isfinite on win32 in HEAD
+         too.
+       * libbase/tu_file.{cpp,h}: fix old-style casts, add some indentation.
+       * libgeometry/Point2d.h: old-style casts, std:: mathematic functions.
+       * libgeometry/Range2d.h: ditto.
+       * server/cxform.h, server/types.h, server/shape.h, server/event_id.h,
+         server/as_value.h: old-style casts.
+       * configure.ac: drop tests for hash map extensions, add -ansi to
+         standard CXXFLAGS (this simply disables gcc extensions, so there
+         should be (and are) no problems building). Add extra warnings to
+         standard CXXFLAGS. Replace NSAPI with NPAPI.
+       * macros/firefox.m4: replace $nsapi with $npapi.
+       * plugins/Makefile.am, plugins/win32/Makefile.am, Makefile.am:
+         NSAPI->NPAPI.
+       * GnashException.h: header guard used reserved identifier.
+
 2008-06-06 Sandro Santilli <address@hidden>
 
        * libmedia/AudioDecoder.h: add a decode(EncodedAudioFrame&) method.
@@ -9,7 +28,8 @@
 
 2008-06-06 Zou Lunkai <address@hidden>
        
-       YOUR ADV HERE
+       * server/matrix.{h,cpp}: more floats to integers migration, cleanups.
+       * testsuite/misc-ming.all/DrawingApiTest.as: make the tests saner.
 
 2008-06-06 Sandro Santilli <address@hidden>
 

Index: server/as_value.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- server/as_value.h   25 May 2008 10:05:20 -0000      1.94
+++ server/as_value.h   6 Jun 2008 10:51:39 -0000       1.95
@@ -535,9 +535,9 @@
        // Flag or unflag an as_value as an exception -- this gets flagged
        // when an as_value is 'thrown'.
        void    flag_exception() 
-       { if (!is_exception()) m_type = (type) ((int) m_type + 1); }
+       { if (!is_exception()) m_type = 
static_cast<type>(static_cast<int>(m_type) + 1); }
        void    unflag_exception()
-       { if (is_exception()) m_type = (type) ((int) m_type - 1); }
+       { if (is_exception()) m_type = 
static_cast<type>(static_cast<int>(m_type) - 1); }
 
        /// Return true if this value is strictly equal to the given one
        //

Index: server/cxform.h
===================================================================
RCS file: /sources/gnash/gnash/server/cxform.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- server/cxform.h     3 Jun 2008 12:27:25 -0000       1.15
+++ server/cxform.h     6 Jun 2008 10:51:40 -0000       1.16
@@ -74,14 +74,14 @@
     cxform & load_from(float * src)
     {
        // enbrace the overflows intentionally.
-        ra = (boost::int16_t)((*src++) * 2.56f);
-        rb = (boost::int16_t)(*src++);
-        ga = (boost::int16_t)((*src++) * 2.56f);
-        gb = (boost::int16_t)(*src++);
-        ba = (boost::int16_t)((*src++) * 2.56f);
-        bb = (boost::int16_t)(*src++);
-        aa = (boost::int16_t)((*src++) * 2.56f);
-        ab = (boost::int16_t)(*src++);
+        ra = static_cast<boost::int16_t>((*src++) * 2.56f);
+        rb = static_cast<boost::int16_t>(*src++);
+        ga = static_cast<boost::int16_t>((*src++) * 2.56f);
+        gb = static_cast<boost::int16_t>(*src++);
+        ba = static_cast<boost::int16_t>((*src++) * 2.56f);
+        bb = static_cast<boost::int16_t>(*src++);
+        aa = static_cast<boost::int16_t>((*src++) * 2.56f);
+        ab = static_cast<boost::int16_t>(*src++);
         return *this;
     }
     

Index: server/event_id.h
===================================================================
RCS file: /sources/gnash/gnash/server/event_id.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/event_id.h   2 Jun 2008 09:52:53 -0000       1.18
+++ server/event_id.h   6 Jun 2008 10:51:40 -0000       1.19
@@ -126,10 +126,13 @@
                while (key::codeMap[i][key::SWF] != SWFkey && i < 
key::KEYCOUNT) i++;
 
                if (i == key::KEYCOUNT) keyCode = key::INVALID;
-               else keyCode = (key::code)i;
+               else keyCode = static_cast<key::code>(i);
        }
 
-       bool    operator==(const event_id& id) const { return m_id == id.m_id 
&& keyCode == id.keyCode; }
+       bool    operator==(const event_id& id) const
+       {
+           return m_id == id.m_id && keyCode == id.keyCode;
+       }
 
        bool operator< (const event_id& id) const
        {

Index: server/shape.h
===================================================================
RCS file: /sources/gnash/gnash/server/shape.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- server/shape.h      5 May 2008 08:47:43 -0000       1.42
+++ server/shape.h      6 Jun 2008 10:51:40 -0000       1.43
@@ -27,6 +27,7 @@
 #include <vector> // for path composition
 #include <boost/bind.hpp>  
 #include <algorithm>
+#include <cmath> // sqrt
 
 
 // Forward declarations
@@ -144,7 +145,7 @@
     distancePtSeg(const Point2d<U>& pt, const Point2d<U>& A, const Point2d<U>& 
B)
     {
       float square = squareDistancePtSeg(pt, A, B);
-      return sqrt(square);
+      return std::sqrt(square);
     }
 
     /// Find point of the quadratic curve defined by points A,C,B
@@ -175,7 +176,7 @@
         << " T:" << t
         << " Q1:" << Q1 << " Q2:" << Q2
         << " R:" << R;
-      log_debug("%s", ss.str().c_str());
+      log_debug("%s", ss.str());
 #endif
 
       return R;
@@ -499,7 +500,7 @@
           float_point p0(A.x, A.y);
           for (int i=1; i<=segCount; ++i)
           {
-            float t1 = (float)i/segCount;
+            float t1 = i / static_cast<float>(segCount);
             float_point p1 = Edge<T>::pointOnCurve(A, C, B, t1);
 
             // distance from point and segment being an approximation

Index: server/types.h
===================================================================
RCS file: /sources/gnash/gnash/server/types.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- server/types.h      4 Jun 2008 22:41:13 -0000       1.23
+++ server/types.h      6 Jun 2008 10:51:40 -0000       1.24
@@ -54,9 +54,9 @@
                ///
                void parseRGB(boost::uint32_t rgbCol)
                {
-                       m_r = (boost::uint8_t)(rgbCol>>16);
-                       m_g = (boost::uint8_t)(rgbCol>>8);
-                       m_b = (boost::uint8_t)(rgbCol);
+                       m_r = static_cast<boost::uint8_t>(rgbCol>>16);
+                       m_g = static_cast<boost::uint8_t>(rgbCol>>8);
+                       m_b = static_cast<boost::uint8_t>(rgbCol);
                }
 
                /// \brief

Index: libbase/GnashException.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/GnashException.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- libbase/GnashException.h    7 May 2008 09:41:13 -0000       1.13
+++ libbase/GnashException.h    6 Jun 2008 10:51:40 -0000       1.14
@@ -15,8 +15,8 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-#ifndef _GNASH_GNASHEXCEPTION__H
-#define _GNASH_GNASHEXCEPTION__H 1
+#ifndef GNASH_GNASHEXCEPTION_H
+#define GNASH_GNASHEXCEPTION_H 1
 
 #include <exception>
 #include <string>
@@ -164,7 +164,7 @@
 
 } // namespace gnash
 
-#endif // def _GNASH_GNASHEXCEPTION__H
+#endif // def GNASH_GNASHEXCEPTION_H
 
 
 // Local Variables:

Index: libbase/tu_file.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_file.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- libbase/tu_file.cpp 19 May 2008 13:03:55 -0000      1.28
+++ libbase/tu_file.cpp 6 Jun 2008 10:51:40 -0000       1.29
@@ -10,6 +10,7 @@
 #include "utility.h"
 #include "log.h"
 
+#include <cstdio>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -40,7 +41,7 @@
     
     assert(appdata);
     assert(dst);
-    return fread( dst, 1, bytes, (FILE *)appdata );
+    return fread( dst, 1, bytes, static_cast<FILE*>(appdata) );
 }
 
 static int
@@ -49,7 +50,7 @@
 {
     assert(appdata);
     assert(src);
-    return fwrite( src, 1, bytes, (FILE *)appdata );
+    return std::fwrite( src, 1, bytes, static_cast<FILE*>(appdata));
 }
 
 static int
@@ -82,7 +83,7 @@
 // Return 0 on success, TU_FILE_SEEK_ERROR on failure.
 {
     assert(appdata);
-    int        result = fseek((FILE*)appdata, 0, SEEK_END);
+    int        result = fseek(static_cast<FILE*>(appdata), 0, SEEK_END);
     if (result == EOF) {
        // @@ TODO should set m_error to something relevant based on errno.
        return TU_FILE_SEEK_ERROR;
@@ -148,7 +149,7 @@
 // Return 0 on success, or TU_FILE_CLOSE_ERROR on failure.
 {
     assert(appdata);
-    int        result = fclose((FILE*)appdata);
+    int        result = std::fclose(static_cast<FILE*>(appdata));
     if (result == EOF) {
        // @@ TODO should set m_error to something relevant based on errno.
        return TU_FILE_CLOSE_ERROR;
@@ -185,7 +186,7 @@
 {
     //GNASH_REPORT_FUNCTION;
 
-    m_data = (void *)fp;
+    m_data = static_cast<void*>(fp);
     m_read = std_read_func;
     m_write = std_write_func;
     m_seek = std_seek_func;

Index: libbase/tu_file.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_file.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- libbase/tu_file.h   28 Mar 2008 10:10:33 -0000      1.22
+++ libbase/tu_file.h   6 Jun 2008 10:51:40 -0000       1.23
@@ -89,12 +89,13 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    boost::uint32_t    read_le32() {
+    boost::uint32_t read_le32() 
+    {
        // read8() is boost::uint8_t, so no masks with 0xff are required.
-       boost::uint32_t result = (boost::uint32_t)read8();
-       result |= (boost::uint32_t)read8() << 8;
-       result |= (boost::uint32_t)read8() << 16;
-       result |= (boost::uint32_t)read8() << 24;
+           boost::uint32_t result = static_cast<boost::uint32_t>(read8());
+           result |= static_cast<boost::uint32_t>(read8()) << 8;
+           result |= static_cast<boost::uint32_t>(read8()) << 16;
+           result |= static_cast<boost::uint32_t>(read8()) << 24;
        return(result);
     }
        
@@ -104,7 +105,8 @@
        /// TODO: define what happens when the stream is in
        ///       error condition, see get_error().
        /// TODO: define a platform-neutral type for 64 bits.
-       long double read_le_double64() {
+       long double read_le_double64()
+       {
                return static_cast<long double> (
                        static_cast<boost::int64_t> (read_le32()) |
                        static_cast<boost::int64_t> (read_le32()) << 32
@@ -116,9 +118,10 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    boost::uint16_t    read_le16() {
-       boost::uint16_t result = (boost::uint16_t)read8();
-       result |= (boost::uint16_t)read8() << 8;
+    boost::uint16_t read_le16()
+    {
+           boost::uint16_t result = static_cast<boost::uint16_t>(read8());
+           result |= static_cast<boost::uint16_t>(read8()) << 8;
        return(result);
     }
 
@@ -127,11 +130,12 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    void       write_le32(boost::uint32_t u) {
-       write8((boost::uint8_t)u);
-       write8((boost::uint8_t)(u>>8));
-       write8((boost::uint8_t)(u>>16));
-       write8((boost::uint8_t)(u>>24));
+    void       write_le32(boost::uint32_t u)
+    {
+        write8(static_cast<boost::int8_t>(u));
+        write8(static_cast<boost::int8_t>(u>>8));
+        write8(static_cast<boost::int8_t>(u>>16));
+        write8(static_cast<boost::int8_t>(u>>24));
     }
 
     /// \brief Write a 16-bit word to a little-endian stream.
@@ -139,9 +143,10 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    void       write_le16(boost::uint16_t u) {
-       write8((boost::uint8_t)u);
-       write8((boost::uint8_t)(u>>8));
+    void write_le16(boost::uint16_t u)
+    {
+        write8(static_cast<boost::int8_t>(u));
+        write8(static_cast<boost::int8_t>(u>>8));
     }
     
     /// \brief Read a single byte from the stream
@@ -163,14 +168,20 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    int        read_bytes(void* dst, int num) { return m_read(dst, num, 
m_data); }
+    int read_bytes(void* dst, int num)
+    {
+        return m_read(dst, num, m_data);
+    }
 
     /// \brief Write the given number of bytes to the stream
     //
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    int        write_bytes(const void* src, int num) { return m_write(src, 
num, m_data); }
+    int write_bytes(const void* src, int num)
+    {
+        return m_write(src, num, m_data);
+    }
     
     /// \brief Write a 0-terminated string to a stream.
     //
@@ -254,37 +265,52 @@
     
     
 private:
-    boost::uint64_t    read64() {
+
+    boost::uint64_t    read64()
+    {
        boost::uint64_t u;
        m_read(&u, 8, m_data);
        return u;
     }
-    boost::uint32_t    read32() {
+
+    boost::uint32_t    read32()
+    {
        boost::uint32_t u;
        m_read(&u, 4, m_data);
        return u;
     }
-    boost::uint16_t    read16() {
+
+    boost::uint16_t read16()
+    {
        boost::uint16_t u;
        m_read(&u, 2, m_data);
        return u;
     }
-    boost::uint8_t     read8() {
+    
+    boost::uint8_t     read8()
+    {
        boost::uint8_t u;
        m_read(&u, 1, m_data);
        return u;
     }
     
-    void       write64(boost::uint64_t u) {
+    void write64(boost::uint64_t u)
+    {
        m_write(&u, 8, m_data);
     }
-    void       write32(boost::uint32_t u) {
+
+    void write32(boost::uint32_t u)
+    {
        m_write(&u, 4, m_data);
     }
-    void       write16(boost::uint16_t u) {
+
+    void write16(boost::uint16_t u)
+    {
        m_write(&u, 2, m_data);
     }
-    void       write8(boost::uint8_t u) {
+
+    void write8(boost::uint8_t u)
+    {
        m_write(&u, 1, m_data);
     }
     
@@ -317,6 +343,7 @@
        float   f;
        boost::uint32_t i;
     } u;
+
     compiler_assert(sizeof(alias) == sizeof(boost::uint32_t));
     
     u.f = value;
@@ -334,6 +361,7 @@
        float   f;
        boost::uint32_t i;
     } u;
+
     compiler_assert(sizeof(u) == sizeof(u.i));
     
     u.i = read_le32();

Index: libbase/utility.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/utility.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- libbase/utility.h   5 Jun 2008 03:26:32 -0000       1.55
+++ libbase/utility.h   6 Jun 2008 10:51:40 -0000       1.56
@@ -21,7 +21,8 @@
 #ifndef UTILITY_H
 #define UTILITY_H
 
-//#include "tu_config.h"
+// HAVE_FINITE, HAVE_PTHREADS, WIN32, NDEBUG etc.
+#include "gnashconfig.h"
 
 #include <cassert>
 #include <cctype>
@@ -96,7 +97,7 @@
 
 inline bool isFinite(double d)
 {
-#ifndef isfinite
+#if defined(HAVE_FINITE) && !defined(isfinite)
     return (finite(d));
 #else
     // Put using namespace std; here if you have to
@@ -136,7 +137,8 @@
 
 inline boost::int32_t Fixed16Mul(boost::int32_t a, boost::int32_t b)
 {
-    return (boost::int32_t)((boost::int64_t)a * (boost::int64_t)b >> 16);
+    return static_cast<boost::int32_t>(
+            static_cast<boost::int64_t>(a) * static_cast<boost::int64_t>(b) >> 
16);
 }
 
 }
@@ -170,11 +172,11 @@
 // concentrated toward zero, instead of randomly distributed in
 // [0,2^32-1], because of shifting up only 5 bits per byte.
 {
-       const unsigned char*    data = (const unsigned char*) data_in;
+       const unsigned char*    data = static_cast<const unsigned 
char*>(data_in);
        unsigned int    h = seed;
        while (size > 0) {
                size--;
-               h = ((h << 5) + h) ^ (unsigned) data[size];
+               h = ((h << 5) + h) ^ static_cast<unsigned>(data[size]);
        }
 
        return h;
@@ -188,11 +190,11 @@
 // This is somewhat slower, but it works way better than the above
 // hash function for hashing large numbers of 32-bit ints.
 {
-       const unsigned char*    data = (const unsigned char*) data_in;
+       const unsigned char* data = static_cast<const unsigned char*>(data_in);
        unsigned int    h = seed;
        while (size > 0) {
                size--;
-               h = (h << 16) + (h << 6) - h + (unsigned) data[size];
+               h = (h << 16) + (h << 6) - h + 
static_cast<unsigned>(data[size]);
        }
 
        return h;
@@ -204,11 +206,11 @@
 // http://www.cs.yorku.ca/~oz/hash.html Due to Dan Bernstein.
 // Allegedly very good on strings.
 {
-       const unsigned char*    data = (const unsigned char*) data_in;
+       const unsigned char* data = static_cast<const unsigned char*>(data_in);
        unsigned int    h = seed;
        while (size > 0) {
                size--;
-               h = ((h << 5) + h) ^ (unsigned) std::tolower(data[size]);       
        
+               h = ((h << 5) + h) ^ 
static_cast<unsigned>(std::tolower(data[size]));           
        }
 
        // Alternative: "sdbm" hash function, suggested at same web page above.

Index: libgeometry/Point2d.h
===================================================================
RCS file: /sources/gnash/gnash/libgeometry/Point2d.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- libgeometry/Point2d.h       27 Mar 2008 16:35:03 -0000      1.8
+++ libgeometry/Point2d.h       6 Jun 2008 10:51:40 -0000       1.9
@@ -140,7 +140,7 @@
        template <typename U>
        bool operator== (const Point2d<U>& p) const
        {
-               return x == (T)p.x && y == (T)p.y;
+               return x == static_cast<T>(p.x) && y == static_cast<T>(p.y);
        }
 
        bool operator!=(const Point2d<T>& p) const

Index: libgeometry/Range2d.h
===================================================================
RCS file: /sources/gnash/gnash/libgeometry/Range2d.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- libgeometry/Range2d.h       27 Mar 2008 16:35:03 -0000      1.23
+++ libgeometry/Range2d.h       6 Jun 2008 10:51:40 -0000       1.24
@@ -76,22 +76,22 @@
 
        T scaleMin(T min, float scale)
        {
-               return roundMin((float)min*scale);
+               return roundMin(static_cast<float>(min) * scale);
        }
 
        T scaleMax(T max, float scale)
        {
-               return roundMax((float)max*scale);
+               return roundMax(static_cast<float>(max) * scale);
        }
 
        T roundMin(float v)
        {
-               return (T)v;
+               return static_cast<T>(v);
        }
 
        T roundMax(float v)
        {
-               return (T)v;
+               return static_cast<T>(v);
        }
 
 public:
@@ -787,7 +787,7 @@
 template <> inline int
 Range2d<int>::roundMin(float min)
 {
-       return static_cast<int>(floor(min));
+       return static_cast<int>(std::floor(min));
 }
 
 /// Specialization of minimum value rounding for unsigned int type.
@@ -797,7 +797,7 @@
 template <> inline unsigned int
 Range2d<unsigned int>::roundMin(float min)
 {
-       return static_cast<unsigned int>(floor(min));
+       return static_cast<unsigned int>(std::floor(min));
 }
 
 /// Specialization of maximum value rounding for int type.
@@ -807,7 +807,7 @@
 template <> inline int
 Range2d<int>::roundMax(float max)
 {
-       return static_cast<int>(ceil(max));
+       return static_cast<int>(std::ceil(max));
 }
 
 /// Specialization of maximum value rounding for unsigned int type.
@@ -817,7 +817,7 @@
 template <> inline unsigned int
 Range2d<unsigned int>::roundMax(float max)
 {
-       return static_cast<unsigned int>(ceil((float)max));
+       return static_cast<unsigned int>(std::ceil(static_cast<float>(max)));
 }
 
 /// Specialization of area value for int type.

Index: plugin/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/plugin/Makefile.am,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- plugin/Makefile.am  27 Apr 2008 01:48:13 -0000      1.76
+++ plugin/Makefile.am  6 Jun 2008 10:51:40 -0000       1.77
@@ -24,13 +24,13 @@
 SUBDIRS += klash
 endif
 
-if NSAPI
+if NPAPI
 SUBDIRS += mozilla-sdk
 
 if WIN32
 SUBDIRS += win32
 endif
-endif # NSAPI
+endif # NPAPI
 
 # if DMALLOC
 # MALL_CFLAGS = $(DMALLOC_CFLAGS)
@@ -90,7 +90,7 @@
          mozilla-sdk/include/obsolete/protypes.h 
 
 if !WIN32
-if NSAPI
+if NPAPI
 
 plugin_LTLIBRARIES = libgnashplugin.la
 
@@ -107,7 +107,7 @@
 else
 libgnashplugin_la_LDFLAGS = -module -avoid-version -L$(plugindir)
 endif
-endif # NSAPI
+endif # NPAPI
 endif # WIN32
 
 test_perms:

Index: plugin/win32/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/plugin/win32/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- plugin/win32/Makefile.am    31 Mar 2008 19:34:10 -0000      1.2
+++ plugin/win32/Makefile.am    6 Jun 2008 10:51:41 -0000       1.3
@@ -17,7 +17,7 @@
 
 AUTOMAKE_OPTIONS = 
 
-if NSAPI
+if NPAPI
 if WIN32
 
 AM_CPPFLAGS = \
@@ -87,7 +87,7 @@
        $(RM) -f $(bindir)/npgnash.dll
 
 endif # WIN32
-endif # NSAPI
+endif # NPAPI
 
 force:
 

Index: macros/firefox.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/firefox.m4,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- macros/firefox.m4   19 May 2008 08:35:07 -0000      1.32
+++ macros/firefox.m4   6 Jun 2008 10:51:41 -0000       1.33
@@ -24,7 +24,7 @@
 [dnl 
 
   FIREFOX_PLUGINS=""
-  if test x"${nsapi}" = x"yes"; then
+  if test x"${npapi}" = x"yes"; then
 
   AC_ARG_WITH(npapi-install,
     AC_HELP_STRING([--with-npapi-install=system|user|prefix], [Policy for 
NPAPI plugin install. Default: user.]),




reply via email to

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