Add a reset() function to FbTk::RefCount

to make it's interface more compatible with other smart pointers.
This commit is contained in:
Pavel Labath 2011-07-02 15:43:46 +02:00
parent 0f85ade9be
commit e4157821fc

View file

@ -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; }