ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/GHash.hh
(Generate patch)
# Line 132 | Line 132
132   // Construct empty hash
133   template <class OBJ> GHash<OBJ>::GHash(GFreeProc* freeProc) {
134    GMALLOC(hash, sizeof(GHashEntry)*DEF_HASH_SIZE);
135 +  fCurrentEntry=-1;
136    fFreeProc=freeProc;
137 +  lastkeyptr=NULL;
138    for (uint i=0; i<DEF_HASH_SIZE; i++)
139           hash[i].hash=-1; //this will be an indicator for 'empty' entries
140    fCapacity=DEF_HASH_SIZE;
# Line 141 | Line 143
143  
144   template <class OBJ> GHash<OBJ>::GHash(bool doFree) {
145    GMALLOC(hash, sizeof(GHashEntry)*DEF_HASH_SIZE);
146 +  fCurrentEntry=-1;
147 +  lastkeyptr=NULL;
148    fFreeProc = (doFree)?&DefaultFreeProc : NULL;
149    for (uint i=0; i<DEF_HASH_SIZE; i++)
150           hash[i].hash=-1; //this will be an indicator for 'empty' entries

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines