gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog gui/Player.cpp gui/Player.h
Date: Sun, 16 Mar 2008 14:22:51 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/03/16 14:22:50

Modified files:
        .              : ChangeLog 
        gui            : Player.cpp Player.h 

Log message:
                * gui/Player.{h,cpp}: handle an empty url, fix misc-ming.all 
failures.
                  Take std::string& instead of const char* - there seems to be 
no case
                  in which distinguishing between NULL and empty is useful.
        
        No testsuite failures any more.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5938&r2=1.5939
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.27&r2=1.28

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5938
retrieving revision 1.5939
diff -u -b -r1.5938 -r1.5939
--- ChangeLog   15 Mar 2008 23:45:21 -0000      1.5938
+++ ChangeLog   16 Mar 2008 14:22:49 -0000      1.5939
@@ -1,3 +1,9 @@
+2008-03-16 Benjamin Wolsey <address@hidden>
+
+       * gui/Player.{h,cpp}: handle an empty url, fix misc-ming.all failures.
+         Take std::string& instead of const char* - there seems to be no case
+         in which distinguishing between NULL and empty is useful.
+
 2008-03-15  Dossy Shiobara <address@hidden>
 
        * plugin/win32/: plugin.cpp (1.15), plugin.h (1.11): Track whether

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- gui/Player.cpp      15 Mar 2008 11:33:41 -0000      1.90
+++ gui/Player.cpp      16 Mar 2008 14:22:50 -0000      1.91
@@ -262,7 +262,7 @@
 
 /* \brief Run, used to open a new flash file. Using previous initialization */
 int
-Player::run(int argc, char* argv[], const char* infile, const char* url)
+Player::run(int argc, char* argv[], const std::string& infile, const 
std::string& url)
 {
     
        // Call this at run() time, so the caller has
@@ -272,23 +272,24 @@
        init_sound();
        init_gui();
    
-       // No file name was supplied
-       assert (infile);
+       // gnash.cpp should check that a filename is supplied.
+       assert (!infile.empty());
+
        _infile = infile;
 
        // Set base url
        if ( _baseurl.empty() )
        {
-               if ( url ) _baseurl = url;
-               else if ( ! strcmp(infile, "-") ) _baseurl = URL("./").str();
+               if (! url.empty() ) _baseurl = url;
+               else if ( infile == "-" ) _baseurl = URL("./").str();
                else _baseurl = infile;
        }
 
        // Set _root._url (either explicit of from infile)
-       if ( url ) {
-               _url = std::string(url);
+       if (! url.empty() ) {
+               _url = url;
        }  else {
-               _url = std::string(infile);
+               _url = infile;
        }
 
 

Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- gui/Player.h        15 Mar 2008 11:33:41 -0000      1.27
+++ gui/Player.h        16 Mar 2008 14:22:50 -0000      1.28
@@ -71,7 +71,7 @@
        ///           
        ///
        int run(int argc, char* argv[],
-               const char* infile, const char* url = NULL);
+               const std::string& infile, const std::string& url = "");
 
        float setScale(float s);
 




reply via email to

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