From eb5a656f4e6177157d98d07884043cee0f23ed58 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 3 Oct 2008 13:34:32 +0000 Subject: [PATCH] From Neil Groves, added intrusive_ptr_add_ref and intrusive_ptr_release methods to enable usage of boost::intrusive_ptr<> with osg::Referenced objects. --- include/osg/Referenced | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/osg/Referenced b/include/osg/Referenced index 7835ac1da..0196c3d3d 100644 --- a/include/osg/Referenced +++ b/include/osg/Referenced @@ -185,6 +185,10 @@ inline void Referenced::unref() const } } +// intrusive_ptr_add_ref and intrusive_ptr_release allow +// use of osg Referenced classes with boost::intrusive_ptr +inline void intrusive_ptr_add_ref(Referenced* p) { p->ref(); } +inline void intrusive_ptr_release(Referenced* p) { p->unref(); } #else