gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/smart_ptr.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/smart_ptr.h
Date: Tue, 24 Oct 2006 09:23:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/10/24 09:23:30

Modified files:
        .              : ChangeLog 
        libbase        : smart_ptr.h 

Log message:
        added operator* for smart_ptr

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1374&r2=1.1375
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/smart_ptr.h?cvsroot=gnash&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1374
retrieving revision 1.1375
diff -u -b -r1.1374 -r1.1375
--- ChangeLog   24 Oct 2006 09:06:42 -0000      1.1374
+++ ChangeLog   24 Oct 2006 09:23:30 -0000      1.1375
@@ -1,7 +1,7 @@
 2006-10-24 Sandro Santilli <address@hidden>
 
-       * server/smart_ptr.h (weak_ptr): made conversion to smart_ptr
-         a const method.
+       * server/smart_ptr.h: made conversion from weak_ptr to smart_ptr
+         a const method, added operator* for smart_ptr
        * server/parser/movie_def_impl.cpp (create_instance): minor cleanups.
 
 2006-10-24 Markus Gothe <address@hidden>

Index: libbase/smart_ptr.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/smart_ptr.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libbase/smart_ptr.h 24 Oct 2006 09:06:42 -0000      1.10
+++ libbase/smart_ptr.h 24 Oct 2006 09:23:30 -0000      1.11
@@ -9,7 +9,7 @@
 // although the nice thing about templates is that no particular
 // ref-counted class is mandated.
 
-/* $Id: smart_ptr.h,v 1.10 2006/10/24 09:06:42 strk Exp $ */
+/* $Id: smart_ptr.h,v 1.11 2006/10/24 09:23:30 strk Exp $ */
 
 #ifndef SMART_PTR_H
 #define SMART_PTR_H
@@ -61,6 +61,8 @@
        void    operator=(T* ptr) { set_ref(ptr); }
 //     void    operator=(const weak_ptr<T>& w);
        T*      operator->() const { assert(m_ptr); return m_ptr; }
+       const T& operator*() const { assert(m_ptr); return *m_ptr; }
+       T& operator*() { assert(m_ptr); return *m_ptr; }
        T*      get_ptr() const { return m_ptr; }
        bool    operator==(const smart_ptr<T>& p) const { return m_ptr == 
p.m_ptr; }
        bool    operator!=(const smart_ptr<T>& p) const { return m_ptr != 
p.m_ptr; }




reply via email to

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