explicit comparison operators needed

This commit is contained in:
David Rose 2007-02-12 19:03:23 +00:00
parent aa60d44d6d
commit 0e1ea07313
2 changed files with 23 additions and 0 deletions

View File

@ -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;
}

View File

@ -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 *)