From b9f7f1862538655cc47b850b958c774b2bbe419e Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 31 May 2005 10:01:15 +0000 Subject: [PATCH] Improve methods, that returns T* --- src/SUIT/SUIT_SmartPtr.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/SUIT/SUIT_SmartPtr.h b/src/SUIT/SUIT_SmartPtr.h index 0bedb2c57..38258ba05 100755 --- a/src/SUIT/SUIT_SmartPtr.h +++ b/src/SUIT/SUIT_SmartPtr.h @@ -52,13 +52,10 @@ public: // getting access //operator RefCount*() { return (RefCount*)p; } - operator T*() { return p; } - T& operator*() { return *p; } - const T& operator*() const { return *p; } - T* operator->() { return p; } - const T* operator->() const { return p; } - const T* get() const { return p; } - T* get() { return p; } + T& operator*() const { return *p; } + T* operator->() const { return p; } + operator T*() const { return p; } + T* get() const { return p; } // assignment template SmartPtr& operator=( const SmartPtr& y_ ) -- 2.39.2