summaryrefslogtreecommitdiff
path: root/indra/llcommon/llrefcount.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-03-29 23:48:29 -0700
committerRichard Linden <none@none>2012-03-29 23:48:29 -0700
commit2fa1c42aadbe2a29e1bcced9a487c0e5abf0602b (patch)
tree08d9ebd23121654a9cf4e0561b1256de9bc9b608 /indra/llcommon/llrefcount.h
parent1ea65f0285d7022ce20ef84d4e35e3c94bcb3fbd (diff)
CHUI-51 WIP notifications routig code cleanup
phase 2, removal of extraneous signaling in favor of llnotificationchannels made notificationchannels work better with overrides and lifetime managed by creator
Diffstat (limited to 'indra/llcommon/llrefcount.h')
-rw-r--r--indra/llcommon/llrefcount.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
index 8eb5d53f3f..32ae15435a 100644
--- a/indra/llcommon/llrefcount.h
+++ b/indra/llcommon/llrefcount.h
@@ -27,6 +27,7 @@
#define LLREFCOUNT_H
#include <boost/noncopyable.hpp>
+#include <boost/intrusive_ptr.hpp>
#define LL_REF_COUNT_DEBUG 0
#if LL_REF_COUNT_DEBUG
@@ -86,4 +87,22 @@ private:
#endif
};
+/**
+ * intrusive pointer support
+ * this allows you to use boost::intrusive_ptr with any LLRefCount-derived type
+ */
+namespace boost
+{
+ inline void intrusive_ptr_add_ref(LLRefCount* p)
+ {
+ p->ref();
+ }
+
+ inline void intrusive_ptr_release(LLRefCount* p)
+ {
+ p->unref();
+ }
+};
+
+
#endif