CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/07/12 23:03:49
Modified files: . : ChangeLog libbase : rc.cpp rc.h testsuite/libbase: TCXXRc.cpp Log message: * libbase/rc.{cpp,h}: make the constructor and destructor private. * testsuite/libbase/TCXXRc.cpp: use the default instance. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3723&r2=1.3724 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.26&r2=1.27 http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/TCXXRc.cpp?cvsroot=gnash&r1=1.13&r2=1.14 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3723 retrieving revision 1.3724 diff -u -b -r1.3723 -r1.3724 --- ChangeLog 12 Jul 2007 22:03:37 -0000 1.3723 +++ ChangeLog 12 Jul 2007 23:03:48 -0000 1.3724 @@ -1,3 +1,8 @@ +2007-07-12 Sandro Santilli <[EMAIL PROTECTED]> + + * libbase/rc.{cpp,h}: make the constructor and destructor private. + * testsuite/libbase/TCXXRc.cpp: use the default instance. + 2007-07-12 davr <[EMAIL PROTECTED]> * testsuite/misc-mtasc.all/: Dejagnu.as, Makefile.am, Index: libbase/rc.cpp =================================================================== RCS file: /sources/gnash/gnash/libbase/rc.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -b -r1.26 -r1.27 --- libbase/rc.cpp 1 Jul 2007 10:54:10 -0000 1.26 +++ libbase/rc.cpp 12 Jul 2007 23:03:49 -0000 1.27 @@ -42,6 +42,8 @@ RcInitFile& RcInitFile::getDefaultInstance() { + // TODO: allocate on the heap and provide a destroyDefaultInstance, + // for finer control of destruction order static RcInitFile rcfile; return rcfile; } Index: libbase/rc.h =================================================================== RCS file: /sources/gnash/gnash/libbase/rc.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- libbase/rc.h 1 Jul 2007 10:54:10 -0000 1.20 +++ libbase/rc.h 12 Jul 2007 23:03:49 -0000 1.21 @@ -35,8 +35,6 @@ class DSOEXPORT RcInitFile { public: - RcInitFile(); - ~RcInitFile(); // Return the default instance of RC file, static RcInitFile& getDefaultInstance(); @@ -114,6 +112,12 @@ private: + /// Construct only by getDefaultInstance() + RcInitFile(); + + /// Never destry (TODO: add a destroyDefaultInstance) + ~RcInitFile(); + int _delay; // the timer delay bool _debug; // enable debugging of this class bool _debugger; // enable the Flash movie debugger Index: testsuite/libbase/TCXXRc.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/libbase/TCXXRc.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- testsuite/libbase/TCXXRc.cpp 1 Jul 2007 10:54:44 -0000 1.13 +++ testsuite/libbase/TCXXRc.cpp 12 Jul 2007 23:03:49 -0000 1.14 @@ -73,7 +73,7 @@ int main (int /*argc*/, char** /*argv*/) { - RcInitFile rc; + RcInitFile& rc = RcInitFile::getDefaultInstance(); gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance(); dbglogfile.setVerbosity(); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit