X-Git-Url: https://git.auder.net/?p=cgds.git;a=blobdiff_plain;f=src%2FHeap.h;h=3452aa0d792a0baad25d74460ff119b97aff09e9;hp=e3608298ae62d73247f6238541950d9902013608;hb=eed1b5d2fca21abae2540b500f4a4ed94a809403;hpb=e45132acdb58c076d5e06849fa51c26de9a7486d diff --git a/src/Heap.h b/src/Heap.h index e360829..3452aa0 100644 --- a/src/Heap.h +++ b/src/Heap.h @@ -40,9 +40,7 @@ Heap* _heap_new( * Usage: Heap* heap_new( type, OrderType hType, UInt arity) */ #define heap_new(type, hType, arity) \ -{ \ - _heap_new(sizeof(type), hType, arity); \ -} + _heap_new(sizeof(type), hType, arity) /** * @brief Copy constructor (shallow copy, ok for basic types). @@ -102,7 +100,7 @@ void _heap_insert( */ #define heap_insert(heap, item, value) \ { \ - typeof((item)) tmp = item; \ + typeof(item) tmp = item; \ _heap_insert(heap, &tmp, value); \ } @@ -129,7 +127,7 @@ void _heap_modify( #define heap_modify(heap, item_, newValue) \ { \ UInt index = 0; \ - typeof((item_)) item__ = item_; \ + typeof(item_) item__ = item_; \ for (; indexarray->size; index++) \ { \ void* pItem = ((ItemValue*)(heap->array->datas[index]))->item; \ @@ -159,7 +157,7 @@ void _heap_remove( #define heap_remove(heap, item_) \ { \ UInt index = 0; \ - typeof((item_)) item__ = item_; \ + typeof(item_) item__ = item_; \ for (; indexarray->size; index++) \ { \ void* pItem = ((ItemValue*)(heap->array->datas[index]))->item; \