aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-02 13:43:46 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-02 13:43:46 (GMT)
commitbd94eaa6cadfd0a7d83f3068a84b27f987bdee4b (patch)
tree0ebc31022f5fe2b3f368ec4691115d6a9c25cb60
parent17dfe176b21fa9dd73194f86554f0fbb9dd4c019 (diff)
downloadfluxbox_pavel-bd94eaa6cadfd0a7d83f3068a84b27f987bdee4b.zip
fluxbox_pavel-bd94eaa6cadfd0a7d83f3068a84b27f987bdee4b.tar.bz2
Add a reset() function to FbTk::RefCount
to make it's interface more compatible with other smart pointers.
-rw-r--r--src/FbTk/RefCount.hh1
1 files changed, 1 insertions, 0 deletions
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:
41 Pointer &operator * () const { return *get(); } 41 Pointer &operator * () const { return *get(); }
42 Pointer *operator -> () const { return get(); } 42 Pointer *operator -> () const { return get(); }
43 Pointer *get() const { return m_data; } 43 Pointer *get() const { return m_data; }
44 void reset(Pointer *p) { *this = p; }
44 /// conversion to "bool" 45 /// conversion to "bool"
45 operator bool_type() const { return m_data ? &RefCount::m_data : 0; } 46 operator bool_type() const { return m_data ? &RefCount::m_data : 0; }
46 47