Changed the const get(), operator*() and operator->() methods to return non const T versions

This commit is contained in:
Robert Osfield 2008-03-14 11:06:35 +00:00
parent e37bb89016
commit 1be388c705

View File

@ -76,22 +76,14 @@ class observer_ptr : public Observer
inline bool operator < (const T* ptr) const { return (_ptr<ptr); }
inline bool operator > (const T* ptr) const { return (_ptr>ptr); }
inline T& operator*() { return *_ptr; }
inline const T& operator*() const { return *_ptr; }
inline T* operator->() { return _ptr; }
inline const T* operator->() const { return _ptr; }
inline T& operator*() const { return *_ptr; }
inline T* operator->() const { return _ptr; }
inline T* get() const { return _ptr; }
inline bool operator!() const { return _ptr==0L; }
inline bool valid() const { return _ptr!=0L; }
inline T* get() { return _ptr; }
inline const T* get() const { return _ptr; }
private:
T* _ptr;