Fix -Winvalid-offsetof warnings

This commit is contained in:
dhewg 2011-12-09 20:49:12 +01:00 committed by Daniel Gibson
parent f4f5d9c914
commit a08e239e28

View file

@ -214,7 +214,7 @@ type *idBlockAlloc<type,blockSize>::Alloc( void ) {
template<class type, int blockSize> template<class type, int blockSize>
void idBlockAlloc<type,blockSize>::Free( type *t ) { void idBlockAlloc<type,blockSize>::Free( type *t ) {
element_t *element = (element_t *)( ( (unsigned char *) t ) - ( (int) &((element_t *)0)->t ) ); element_t *element = (element_t *)( intptr_t(t) - sizeof(intptr_t) );
element->next = free; element->next = free;
free = element; free = element;
active--; active--;