Merge "Remove dead/unused code and realign some of the comments to make it more cleaner and easier to read"
This commit is contained in:
commit
99e084ca80
3 changed files with 8 additions and 23 deletions
|
@ -140,7 +140,6 @@ static bool resizeHash(HashTable* pHashTable, int newSize)
|
|||
int i;
|
||||
|
||||
assert(countTombStones(pHashTable) == pHashTable->numDeadEntries);
|
||||
//LOGI("before: dead=%d\n", pHashTable->numDeadEntries);
|
||||
|
||||
pNewEntries = (HashEntry*) calloc(newSize, sizeof(HashTable));
|
||||
if (pNewEntries == NULL)
|
||||
|
@ -196,7 +195,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
|
|||
(*cmpFunc)(pEntry->data, item) == 0)
|
||||
{
|
||||
/* match */
|
||||
//LOGD("+++ match on entry %d\n", pEntry - pHashTable->pEntries);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -206,8 +204,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
|
|||
break; /* edge case - single-entry table */
|
||||
pEntry = pHashTable->pEntries;
|
||||
}
|
||||
|
||||
//LOGI("+++ look probing %d...\n", pEntry - pHashTable->pEntries);
|
||||
}
|
||||
|
||||
if (pEntry->data == NULL) {
|
||||
|
@ -228,10 +224,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
|
|||
abort();
|
||||
}
|
||||
/* note "pEntry" is now invalid */
|
||||
} else {
|
||||
//LOGW("okay %d/%d/%d\n",
|
||||
// pHashTable->numEntries, pHashTable->tableSize,
|
||||
// (pHashTable->tableSize * LOAD_NUMER) / LOAD_DENOM);
|
||||
}
|
||||
|
||||
/* full table is bad -- search for nonexistent never halts */
|
||||
|
@ -264,7 +256,6 @@ bool mzHashTableRemove(HashTable* pHashTable, unsigned int itemHash, void* item)
|
|||
pEnd = &pHashTable->pEntries[pHashTable->tableSize];
|
||||
while (pEntry->data != NULL) {
|
||||
if (pEntry->data == item) {
|
||||
//LOGI("+++ stepping on entry %d\n", pEntry - pHashTable->pEntries);
|
||||
pEntry->data = HASH_TOMBSTONE;
|
||||
pHashTable->numEntries--;
|
||||
pHashTable->numDeadEntries++;
|
||||
|
@ -277,8 +268,6 @@ bool mzHashTableRemove(HashTable* pHashTable, unsigned int itemHash, void* item)
|
|||
break; /* edge case - single-entry table */
|
||||
pEntry = pHashTable->pEntries;
|
||||
}
|
||||
|
||||
//LOGI("+++ del probing %d...\n", pEntry - pHashTable->pEntries);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -327,10 +327,6 @@ static bool parseZipArchive(ZipArchive* pArchive)
|
|||
#else
|
||||
pEntry = &pArchive->pEntries[i];
|
||||
#endif
|
||||
|
||||
//LOGI("%d: localHdr=%d fnl=%d el=%d cl=%d\n",
|
||||
// i, localHdrOffset, fileNameLen, extraLen, commentLen);
|
||||
|
||||
pEntry->fileNameLen = fileNameLen;
|
||||
pEntry->fileName = fileName;
|
||||
|
||||
|
|
Loading…
Reference in a new issue