From e4157821fc159371ff7bd8b6b1b0a889c81e72a2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 2 Jul 2011 15:43:46 +0200 Subject: Add a reset() function to FbTk::RefCount to make it's interface more compatible with other smart pointers. --- src/FbTk/RefCount.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FbTk/RefCount.hh b/src/FbTk/RefCount.hh index fe267e3..8adcc83 100644 --- a/src/FbTk/RefCount.hh +++ b/src/FbTk/RefCount.hh @@ -41,6 +41,7 @@ public: Pointer &operator * () const { return *get(); } Pointer *operator -> () const { return get(); } Pointer *get() const { return m_data; } + void reset(Pointer *p) { *this = p; } /// conversion to "bool" operator bool_type() const { return m_data ? &RefCount::m_data : 0; } -- cgit v0.11.2