aboutsummaryrefslogtreecommitdiff
path: root/src/stable/hash.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-08-18 23:43:21 +0000
committerMike Buland <eichlan@xagasoft.com>2012-08-18 23:43:21 +0000
commitf5ac2c1ba333ce6aa6d385d9a63b658caaa46503 (patch)
treecd78edf4663967a99c483fd0a7f0506328cab008 /src/stable/hash.h
parent80aa35bbeca7d034c788be9942725dae9d3f46c4 (diff)
downloadlibbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.gz
libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.bz2
libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.tar.xz
libbu++-f5ac2c1ba333ce6aa6d385d9a63b658caaa46503.zip
Added hashtable += support, optomized the random number base some?
Diffstat (limited to 'src/stable/hash.h')
-rw-r--r--src/stable/hash.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stable/hash.h b/src/stable/hash.h
index e461cf5..86f189e 100644
--- a/src/stable/hash.h
+++ b/src/stable/hash.h
@@ -1212,6 +1212,21 @@ namespace Bu
1212 return !(*this == rhs); 1212 return !(*this == rhs);
1213 } 1213 }
1214 1214
1215 MyType &operator+=( const MyType &rhs )
1216 {
1217 if( this == &rhs )
1218 return *this;
1219 if( core == rhs.core )
1220 return *this;
1221 if( core == NULL || rhs.core == NULL )
1222 return *this;
1223
1224 for( const_iterator i = rhs.begin(); i; i++ )
1225 insert( i.getKey(), i.getValue() );
1226
1227 return *this;
1228 }
1229
1215 protected: 1230 protected:
1216 virtual Core *_copyCore( Core *src ) 1231 virtual Core *_copyCore( Core *src )
1217 { 1232 {