2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Get rid of ALLOCZERO macro.

This commit is contained in:
Darryl Pogue
2012-01-21 15:39:48 -08:00
committed by Adam Johnson
parent f4ff65ccbc
commit 7d7d7d273f
2 changed files with 3 additions and 5 deletions

View File

@ -163,8 +163,6 @@ inline void CDECL operator delete (void *, void *) {}
*
***/
#define ALLOCZERO(b) MemAlloc(b, kMemZero, __FILE__, __LINE__)
#ifdef __cplusplus
#define NEWZERO(t) new(MemAlloc(sizeof(t), kMemZero, __FILE__, __LINE__)) t

View File

@ -150,7 +150,7 @@ bool IParseForSubst (
SUBST_BLOCK * block = new SUBST_BLOCK;
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype));
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);
@ -169,7 +169,7 @@ bool IParseForSubst (
SUBST_BLOCK * block = new SUBST_BLOCK;
block->isVar = true;
block->strLen = strLen;
block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype));
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, varStart, strLen * sizeof(chartype));
dest->blocks.Add(block);
@ -183,7 +183,7 @@ bool IParseForSubst (
SUBST_BLOCK * block = new SUBST_BLOCK;
block->isVar = false;
block->strLen = strLen;
block->data = (chartype*)ALLOCZERO((strLen + 1) * sizeof(chartype));
block->data = (chartype*)calloc((strLen + 1), sizeof(chartype));
MemCopy(block->data, src, strLen * sizeof(chartype));
dest->blocks.Add(block);