Removed a few explicit casts which caused warnings. (From louisdx)

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3707 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2011-12-21 17:58:57 +00:00
parent d649de4199
commit 6bdee53e70
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ Heap_new(HeapValue_Comparator comparator, size_t initialSize, size_t minSize,
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;
+4 -4
View File
@@ -169,12 +169,12 @@ static void
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) *));