From 7d7d7d273ff87bb106a84e2166058fafe30d1e2e Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sat, 21 Jan 2012 15:39:48 -0800 Subject: [PATCH] Get rid of ALLOCZERO macro. --- Sources/Plasma/CoreLib/hsMalloc.h | 2 -- Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Sources/Plasma/CoreLib/hsMalloc.h b/Sources/Plasma/CoreLib/hsMalloc.h index 2f985e75..7537e281 100644 --- a/Sources/Plasma/CoreLib/hsMalloc.h +++ b/Sources/Plasma/CoreLib/hsMalloc.h @@ -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 diff --git a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp index 45036568..6c8f6ec6 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp @@ -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);