From 0e1ea073134150ccd2c9f0a9d2e46717f711279b Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 12 Feb 2007 19:03:23 +0000 Subject: [PATCH] explicit comparison operators needed --- panda/src/express/pointerToVoid.I | 20 ++++++++++++++++++++ panda/src/express/pointerToVoid.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/panda/src/express/pointerToVoid.I b/panda/src/express/pointerToVoid.I index 93a863531d..e7573c76b6 100644 --- a/panda/src/express/pointerToVoid.I +++ b/panda/src/express/pointerToVoid.I @@ -89,3 +89,23 @@ operator < (const PointerToVoid &other) const { return _void_ptr < other._void_ptr; } +//////////////////////////////////////////////////////////////////// +// Function: PointerToVoid::operator == +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE bool PointerToVoid:: +operator == (const PointerToVoid &other) const { + return _void_ptr == other._void_ptr; +} + +//////////////////////////////////////////////////////////////////// +// Function: PointerToVoid::operator != +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE bool PointerToVoid:: +operator != (const PointerToVoid &other) const { + return _void_ptr != other._void_ptr; +} + diff --git a/panda/src/express/pointerToVoid.h b/panda/src/express/pointerToVoid.h index 625097b49b..e5c12ab9b6 100644 --- a/panda/src/express/pointerToVoid.h +++ b/panda/src/express/pointerToVoid.h @@ -52,6 +52,9 @@ public: INLINE bool operator < (const void *other) const; INLINE bool operator < (const PointerToVoid &other) const; + INLINE bool operator == (const PointerToVoid &other) const; + INLINE bool operator != (const PointerToVoid &other) const; + protected: // Within the PointerToVoid class, we only store a void pointer. // This is actually the (To *) pointer that is typecast to (void *)