From: <Mee...@us...> - 2011-12-21 17:59:06
|
Revision: 3707 http://sc2.svn.sourceforge.net/sc2/?rev=3707&view=rev Author: Meep-Eep Date: 2011-12-21 17:58:57 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Removed a few explicit casts which caused warnings. (From louisdx) Modified Paths: -------------- trunk/sc2/src/libs/heap/heap.c trunk/sc2/src/libs/uio/hashtable.c Modified: trunk/sc2/src/libs/heap/heap.c =================================================================== --- trunk/sc2/src/libs/heap/heap.c 2011-12-21 17:43:44 UTC (rev 3706) +++ trunk/sc2/src/libs/heap/heap.c 2011-12-21 17:58:57 UTC (rev 3707) @@ -49,7 +49,7 @@ heap->minSize = minSize; heap->minFillQuotient = minFillQuotient; heap->size = nextPower2(initialSize); - heap->minFill = (size_t) ceil(((double) (heap->size >> 1)) + heap->minFill = ceil(((double) (heap->size >> 1)) * heap->minFillQuotient); heap->entries = malloc(heap->size * sizeof (HeapValue *)); heap->numEntries = 0; Modified: trunk/sc2/src/libs/uio/hashtable.c =================================================================== --- trunk/sc2/src/libs/uio/hashtable.c 2011-12-21 17:43:44 UTC (rev 3706) +++ trunk/sc2/src/libs/uio/hashtable.c 2011-12-21 17:58:57 UTC (rev 3707) @@ -169,12 +169,12 @@ HASHTABLE_(setup)(HASHTABLE_(HashTable) *hashTable, uio_uint32 initialSize) { if (initialSize < 4) initialSize = 4; - hashTable->size = nextPower2((uio_uint32) ceil( - ((double) initialSize) / hashTable->maxFillQuotient)); + hashTable->size = nextPower2(ceil(((double) initialSize) / + hashTable->maxFillQuotient)); hashTable->hashMask = hashTable->size - 1; - hashTable->minSize = (uio_uint32) ceil(((double) (hashTable->size >> 1)) + hashTable->minSize = ceil(((double) (hashTable->size >> 1)) * hashTable->minFillQuotient); - hashTable->maxSize = (uio_uint32) floor(((double) hashTable->size) + hashTable->maxSize = floor(((double) hashTable->size) * hashTable->maxFillQuotient); hashTable->entries = uio_calloc(hashTable->size, sizeof (HASHTABLE_(HashEntry) *)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |