From 1be388c705294b5180d759e3aa332a17ef5f47a3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 14 Mar 2008 11:06:35 +0000 Subject: [PATCH] Changed the const get(), operator*() and operator->() methods to return non const T versions --- include/osg/observer_ptr | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/include/osg/observer_ptr b/include/osg/observer_ptr index 6a07ad834..464f37fab 100644 --- a/include/osg/observer_ptr +++ b/include/osg/observer_ptr @@ -76,22 +76,14 @@ class observer_ptr : public Observer inline bool operator < (const T* ptr) const { return (_ptr (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;