Fixed struct inconsistency for struct Hash_Table.

* scl_hash.h and hash.h have similar struct for struct Hash_Table
  and should have same members and types.
* fixed signed/unsigned comparison warning in HASHCreate function.
This commit is contained in:
davyw
2011-12-12 14:59:58 +01:00
parent 3bff65bc9b
commit 737c53ef28
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -104,12 +104,12 @@ struct Element {
};
struct Hash_Table {
short p; // Next bucket to be split
short maxp; // upper bound on p during expansion
long KeyCount; // current # keys
short SegmentCount; // current # segments
short MinLoadFactor;
short MaxLoadFactor;
unsigned int p; // Next bucket to be split
unsigned int maxp; // upper bound on p during expansion
long KeyCount; // current # keys
unsigned int SegmentCount; // current # segments
unsigned int MinLoadFactor;
unsigned int MaxLoadFactor;
#define DIRECTORY_SIZE 256
#define DIRECTORY_SIZE_SHIFT 8 // log2(DIRECTORY_SIZE)
struct Element ** Directory[DIRECTORY_SIZE];
+1 -1
View File
@@ -141,7 +141,7 @@ HASHinitialize() {
Hash_Table
HASHcreate( unsigned count ) {
int i;
unsigned i;
Hash_Table table;
/*