summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cachestorefiles.h2
-rw-r--r--src/cachestoremyriad.h2
-rw-r--r--src/hash.h41
3 files changed, 43 insertions, 2 deletions
diff --git a/src/cachestorefiles.h b/src/cachestorefiles.h
index 1906b13..c2cf091 100644
--- a/src/cachestorefiles.h
+++ b/src/cachestorefiles.h
@@ -83,7 +83,7 @@ namespace Bu
83 } 83 }
84 } 84 }
85 85
86 virtual void unload( obtype *pObj, const keytype &key ) 86 virtual void unload( obtype *pObj, const keytype & )
87 { 87 {
88 delete pObj; 88 delete pObj;
89 } 89 }
diff --git a/src/cachestoremyriad.h b/src/cachestoremyriad.h
index b90793d..21c84e6 100644
--- a/src/cachestoremyriad.h
+++ b/src/cachestoremyriad.h
@@ -85,7 +85,7 @@ namespace Bu
85 return pOb; 85 return pOb;
86 } 86 }
87 87
88 virtual void unload( obtype *pObj, const keytype &key ) 88 virtual void unload( obtype *pObj, const keytype & )
89 { 89 {
90 delete pObj; 90 delete pObj;
91 } 91 }
diff --git a/src/hash.h b/src/hash.h
index d251c46..354569e 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1148,6 +1148,47 @@ namespace Bu
1148 return lValues; 1148 return lValues;
1149 } 1149 }
1150 1150
1151 bool operator==( const MyType &rhs ) const
1152 {
1153 if( this == &rhs )
1154 return true;
1155 if( core == rhs.core )
1156 return true;
1157 if( core == NULL || rhs.core == NULL )
1158 return false;
1159 if( getSize() != rhs.getSize() )
1160 return false;
1161
1162 for( uint32_t j = 0; j < core->nCapacity; j++ )
1163 {
1164 if( core->isFilled( j ) )
1165 {
1166 if( !core->isDeleted( j ) )
1167 {
1168 // Check to see if this key is in the other hash
1169 if( rhs.has( core->aKeys[j] ) )
1170 {
1171 if( !(core->aValues[j] == rhs.get( core->aKeys[j]) ) )
1172 {
1173 return false;
1174 }
1175 }
1176 else
1177 {
1178 return false;
1179 }
1180 }
1181 }
1182 }
1183
1184 return true;
1185 }
1186
1187 bool operator!=( const MyType &rhs ) const
1188 {
1189 return !(*this == rhs);
1190 }
1191
1151 protected: 1192 protected:
1152 virtual Core *_copyCore( Core *src ) 1193 virtual Core *_copyCore( Core *src )
1153 { 1194 {