From 02782a0ac44aa1ddd4260198ec206ade293c82ba Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 27 Aug 2009 15:29:33 +0000 Subject: Huh, the Bu::Cache::Ptr didn't have comparison operators, seems odd. I should probably document some of that...if you do an == with Bu::Cache::Ptr objects it will compare them to see if they are the same pointer, not if the data contained is compatible. i.e. to see if two pointers are the same data, you can do: a == b but to see if a and b contain compatible data, do: *a == *b :) --- src/cache.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/cache.h b/src/cache.h index 53b4f7a..87037f7 100644 --- a/src/cache.h +++ b/src/cache.h @@ -147,6 +147,16 @@ namespace Bu return *this; } + bool operator==( const Ptr &rRhs ) const + { + return pData == rRhs.pData; + } + + bool operator!=( const Ptr &rRhs ) const + { + return pData != rRhs.pData; + } + private: void checkPtr() const { -- cgit v1.2.3