[Top][All Lists]
[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: |
Mon, 23 Oct 2006 13:34:12 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/10/23 13:34:12
Modified files:
. : ChangeLog
libbase : smart_ptr.h
Log message:
(weak_ptr): made equality operator an inspector, added inequality
operator.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1361&r2=1.1362
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/smart_ptr.h?cvsroot=gnash&r1=1.8&r2=1.9
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1361
retrieving revision 1.1362
diff -u -b -r1.1361 -r1.1362
--- ChangeLog 23 Oct 2006 13:01:51 -0000 1.1361
+++ ChangeLog 23 Oct 2006 13:34:12 -0000 1.1362
@@ -1,3 +1,8 @@
+2006-10-23 Sandro Santilli <address@hidden>
+
+ * libbase/smart_ptr.h (weak_ptr): made equality operator an inspector,
+ added inequality operator.
+
2006-10-23 Markus Gothe <address@hidden>
* macro/jpeg.m4: Fixed a bug.
Index: libbase/smart_ptr.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/smart_ptr.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- libbase/smart_ptr.h 5 Oct 2006 16:03:36 -0000 1.8
+++ libbase/smart_ptr.h 23 Oct 2006 13:34:12 -0000 1.9
@@ -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.8 2006/10/05 16:03:36 nihilus Exp $ */
+/* $Id: smart_ptr.h,v 1.9 2006/10/23 13:34:12 strk Exp $ */
#ifndef SMART_PTR_H
#define SMART_PTR_H
@@ -200,11 +200,13 @@
return smart_ptr<T>(m_ptr);
}
- bool operator==(T* ptr) { check_proxy(); return m_ptr == ptr; }
- bool operator==(const smart_ptr<T>& ptr) { check_proxy(); return
m_ptr == ptr.get_ptr(); }
+ bool operator==(T* ptr) const { check_proxy(); return m_ptr == ptr; }
+ bool operator==(const smart_ptr<T>& ptr) const { check_proxy();
return m_ptr == ptr.get_ptr(); }
+
+ bool operator!=(const smart_ptr<T>& ptr) const { check_proxy();
return m_ptr != ptr.get_ptr(); }
private:
- void check_proxy()
+ void check_proxy() const
// Set m_ptr to NULL if the object died.
{
if (m_ptr)
@@ -219,8 +221,8 @@
}
}
- smart_ptr<weak_proxy> m_proxy;
- T* m_ptr;
+ mutable smart_ptr<weak_proxy> m_proxy;
+ mutable T* m_ptr;
};
- [Gnash-commit] gnash ChangeLog libbase/smart_ptr.h,
Sandro Santilli <=