Browse Source

Get rid of ALLOCZERO macro.

Darryl Pogue 13 years ago committed by Adam Johnson
parent
commit
7d7d7d273f
  1. 2
      Sources/Plasma/CoreLib/hsMalloc.h
  2. 6
      Sources/Plasma/NucleusLib/pnUtils/Private/pnUtSubst.cpp

2
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

6
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);

Loading…
Cancel
Save