diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-11-21 20:26:23 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-11-21 20:26:23 +0000 |
commit | 8fbf5fda24392d2a2ee19d6f40699a5de29da662 (patch) | |
tree | ac79c447bc4897d8cc350068504f184fdb8e4cfa /src/hashtable.cpp | |
parent | 2bb05378f31311c353d43688fa753822ab9a6461 (diff) | |
download | libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.gz libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.bz2 libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.tar.xz libbu++-8fbf5fda24392d2a2ee19d6f40699a5de29da662.zip |
Everything in libbu++ now passes -Wall, this should have been done a long time
ago.
Diffstat (limited to 'src/hashtable.cpp')
-rw-r--r-- | src/hashtable.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hashtable.cpp b/src/hashtable.cpp index 725ebc4..dbcd964 100644 --- a/src/hashtable.cpp +++ b/src/hashtable.cpp | |||
@@ -41,7 +41,7 @@ bool HashTable::isFilled( int j ) | |||
41 | return (aTable[j].id != NULL)||(aTable[j].bDeleted); | 41 | return (aTable[j].id != NULL)||(aTable[j].bDeleted); |
42 | } | 42 | } |
43 | 43 | ||
44 | bool HashTable::reHash( unsigned long int nNewSize ) | 44 | void HashTable::reHash( unsigned long int nNewSize ) |
45 | { | 45 | { |
46 | HashNode *aOldTable = aTable; | 46 | HashNode *aOldTable = aTable; |
47 | unsigned long int oldSize = nTableSize; | 47 | unsigned long int oldSize = nTableSize; |
@@ -90,7 +90,7 @@ unsigned long int HashTable::probe( unsigned long int nStart, const void *id ) | |||
90 | */ | 90 | */ |
91 | if( isFilled( nStart ) ) | 91 | if( isFilled( nStart ) ) |
92 | { | 92 | { |
93 | int nOldStart = nStart; | 93 | unsigned long int nOldStart = nStart; |
94 | for( | 94 | for( |
95 | nStart++; | 95 | nStart++; |
96 | isFilled( nStart ) && nStart != nOldStart; | 96 | isFilled( nStart ) && nStart != nOldStart; |
@@ -221,7 +221,7 @@ const void *HashTable::get( const void *id, unsigned long int nSkip ) | |||
221 | 221 | ||
222 | if( bAllowDupes ) | 222 | if( bAllowDupes ) |
223 | { | 223 | { |
224 | int nOldPos = nPos; | 224 | unsigned long int nOldPos = nPos; |
225 | for( nPos++; nPos != nOldPos; nPos=(nPos+1)%nTableSize ) | 225 | for( nPos++; nPos != nOldPos; nPos=(nPos+1)%nTableSize ) |
226 | { | 226 | { |
227 | if( !isFilled( nPos ) ) return NULL; | 227 | if( !isFilled( nPos ) ) return NULL; |
@@ -270,7 +270,7 @@ const void *HashTable::getKey( const void *id, unsigned long int nSkip ) | |||
270 | 270 | ||
271 | if( bAllowDupes ) | 271 | if( bAllowDupes ) |
272 | { | 272 | { |
273 | int nOldPos = nPos; | 273 | unsigned long int nOldPos = nPos; |
274 | for( nPos++; nPos != nOldPos; nPos=(nPos+1)%nTableSize ) | 274 | for( nPos++; nPos != nOldPos; nPos=(nPos+1)%nTableSize ) |
275 | { | 275 | { |
276 | if( !isFilled( nPos ) ) return NULL; | 276 | if( !isFilled( nPos ) ) return NULL; |