* Usage: Heap* heap_new(<Type> 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).
*/
#define heap_insert(heap, item, value) \
{ \
- typeof((item)) tmp = item; \
+ typeof(item) tmp = item; \
_heap_insert(heap, &tmp, value); \
}
#define heap_modify(heap, item_, newValue) \
{ \
UInt index = 0; \
- typeof((item_)) item__ = item_; \
+ typeof(item_) item__ = item_; \
for (; index<heap->array->size; index++) \
{ \
void* pItem = ((ItemValue*)(heap->array->datas[index]))->item; \
#define heap_remove(heap, item_) \
{ \
UInt index = 0; \
- typeof((item_)) item__ = item_; \
+ typeof(item_) item__ = item_; \
for (; index<heap->array->size; index++) \
{ \
void* pItem = ((ItemValue*)(heap->array->datas[index]))->item; \