Changed the const get(), operator*() and operator->() methods to return non const T versions
This commit is contained in:
parent
e37bb89016
commit
1be388c705
@ -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 bool operator > (const T* ptr) const { return (_ptr>ptr); }
|
inline bool operator > (const T* ptr) const { return (_ptr>ptr); }
|
||||||
|
|
||||||
|
inline T& operator*() const { return *_ptr; }
|
||||||
inline T& operator*() { return *_ptr; }
|
inline T* operator->() const { return _ptr; }
|
||||||
|
inline T* get() const { return _ptr; }
|
||||||
inline const T& operator*() const { return *_ptr; }
|
|
||||||
|
|
||||||
inline T* operator->() { return _ptr; }
|
|
||||||
|
|
||||||
inline const T* operator->() const { return _ptr; }
|
|
||||||
|
|
||||||
inline bool operator!() const { return _ptr==0L; }
|
inline bool operator!() const { return _ptr==0L; }
|
||||||
|
|
||||||
inline bool valid() const { return _ptr!=0L; }
|
inline bool valid() const { return _ptr!=0L; }
|
||||||
|
|
||||||
inline T* get() { return _ptr; }
|
|
||||||
|
|
||||||
inline const T* get() const { return _ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T* _ptr;
|
T* _ptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user