From f0b766e37c38a8ae1bc8bbb853654f9eddd6eded Mon Sep 17 00:00:00 2001 From: dean11 Date: Mon, 2 Dec 2013 14:43:57 +0100 Subject: [PATCH] Something done in misc --- Code/Misc/Utilities-Impl.h | 8 ++++++++ Code/Misc/Utilities.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Code/Misc/Utilities-Impl.h b/Code/Misc/Utilities-Impl.h index cc82c959..33b35662 100644 --- a/Code/Misc/Utilities-Impl.h +++ b/Code/Misc/Utilities-Impl.h @@ -274,6 +274,14 @@ namespace Utility { return &p == this->_ptr; } + template inline bool SmartPointer::operator!= (const SmartPointer& d) + { + return d._ptr != this->_ptr; + } + template inline bool SmartPointer::operator!= (const T& p) + { + return &p != this->_ptr; + } template inline T& SmartPointer::operator* () { return *this->_ptr; diff --git a/Code/Misc/Utilities.h b/Code/Misc/Utilities.h index ec8b0229..e541e1df 100644 --- a/Code/Misc/Utilities.h +++ b/Code/Misc/Utilities.h @@ -212,6 +212,8 @@ namespace Utility SmartPointer& operator= (T* p); bool operator== (const SmartPointer& d); bool operator== (const T& p); + bool operator!= (const SmartPointer& d); + bool operator!= (const T& p); T& operator* (); T* operator-> (); operator T* ();