diff --git a/idlib/Heap.h b/idlib/Heap.h index 6cc27eb..db17a95 100644 --- a/idlib/Heap.h +++ b/idlib/Heap.h @@ -170,8 +170,8 @@ public: private: typedef struct element_s { - struct element_s * next; type t; + struct element_s * next; } element_t; typedef struct block_s { element_t elements[blockSize]; @@ -217,7 +217,7 @@ type *idBlockAlloc::Alloc( void ) { template void idBlockAlloc::Free( type *t ) { - element_t *element = (element_t *)( intptr_t(t) - sizeof(intptr_t) ); + element_t *element = (element_t *)t; element->next = free; free = element; active--;