r339 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Nov 13 12:51:21 EST 2005
Author: ludwig
Date: 2005-11-13 12:51:21 -0500 (Sun, 13 Nov 2005)
New Revision: 339
Modified:
trunk/code/qcommon/common.c
Log:
use common macro for alignment
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2005-11-13 07:31:40 UTC (rev 338)
+++ trunk/code/qcommon/common.c 2005-11-13 17:51:21 UTC (rev 339)
@@ -928,7 +928,7 @@
//
size += sizeof(memblock_t); // account for size of block header
size += 4; // space for memory trash tester
- size = (size + sizeof(void*)-1)&~(sizeof(void*)-1); // align to 32/64 bit boundary
+ size = ALIGN(size); // align to 32/64 bit boundary
base = rover = zone->rover;
start = base->prev;
@@ -1745,7 +1745,7 @@
Hunk_SwapBanks();
- size = ( (size+sizeof(void*)-1)&~(sizeof(void*)-1) ) + sizeof( hunkHeader_t );
+ size = ALIGN(size) + sizeof( hunkHeader_t );
if ( hunk_temp->temp + hunk_permanent->permanent + size > s_hunkTotal ) {
Com_Error( ERR_DROP, "Hunk_AllocateTempMemory: failed on %i", size );
More information about the quake3-commits
mailing list