summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-08-27 15:29:33 +0000
committerMike Buland <eichlan@xagasoft.com>2009-08-27 15:29:33 +0000
commit02782a0ac44aa1ddd4260198ec206ade293c82ba (patch)
treee995a0fc4bb0bd94e55ed15d58ec1eaddc0a14d9 /src
parent728c597690056536a15910fb64a2b6ea104aa975 (diff)
downloadlibbu++-02782a0ac44aa1ddd4260198ec206ade293c82ba.tar.gz
libbu++-02782a0ac44aa1ddd4260198ec206ade293c82ba.tar.bz2
libbu++-02782a0ac44aa1ddd4260198ec206ade293c82ba.tar.xz
libbu++-02782a0ac44aa1ddd4260198ec206ade293c82ba.zip
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 :)
Diffstat (limited to 'src')
-rw-r--r--src/cache.h10
1 files changed, 10 insertions, 0 deletions
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
147 return *this; 147 return *this;
148 } 148 }
149 149
150 bool operator==( const Ptr &rRhs ) const
151 {
152 return pData == rRhs.pData;
153 }
154
155 bool operator!=( const Ptr &rRhs ) const
156 {
157 return pData != rRhs.pData;
158 }
159
150 private: 160 private:
151 void checkPtr() const 161 void checkPtr() const
152 { 162 {