From b70c80ba399978876d52fb7b4f794054733411a8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 6 Mar 2003 10:38:31 +0000 Subject: [PATCH] Add #ifndef's around the comparison operator's against const T* now that the implicit cast operator has been added. --- include/osg/ref_ptr | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/include/osg/ref_ptr b/include/osg/ref_ptr index 95af988b5..3d8512cb9 100644 --- a/include/osg/ref_ptr +++ b/include/osg/ref_ptr @@ -55,26 +55,17 @@ class ref_ptr return *this; } +#ifndef AUTOMATIC_CAST_TO_POINTER inline bool operator == (const ref_ptr& rp) const { return (_ptr==rp._ptr); } - inline bool operator == (const T* ptr) const - { - return (_ptr==ptr); - } - inline bool operator != (const ref_ptr& rp) const { return (_ptr!=rp._ptr); } - inline bool operator != (const T* ptr) const - { - return (_ptr!=ptr); - } - inline bool operator < (const ref_ptr& rp) const { return (_ptrrp._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 (const T* ptr) const { return (_ptr>ptr); } +#endif + inline T& operator*() { return *_ptr; }