mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-22 12:11:17 +00:00
parent
13d57cdbd6
commit
34129e8484
2 changed files with 9 additions and 6 deletions
|
@ -77,6 +77,14 @@ void *M_Realloc(void *memblock, size_t size)
|
|||
GC::ReportRealloc(oldsize, _msize(block));
|
||||
return block;
|
||||
}
|
||||
|
||||
void* M_Calloc(size_t v1, size_t v2)
|
||||
{
|
||||
auto p = M_Malloc(v1 * v2);
|
||||
memset(p, 0, v1 * v2);
|
||||
return p;
|
||||
}
|
||||
|
||||
#else
|
||||
void *M_Malloc(size_t size)
|
||||
{
|
||||
|
|
|
@ -72,12 +72,7 @@ inline void* M_Calloc_Dbg(size_t v1, size_t v2, const char* file, int lineno)
|
|||
#else
|
||||
void *M_Malloc (size_t size);
|
||||
void *M_Realloc (void *memblock, size_t size);
|
||||
inline void* M_Calloc(size_t v1, size_t v2)
|
||||
{
|
||||
auto p = M_Malloc(v1 * v2);
|
||||
memset(p, 0, v1 * v2);
|
||||
return p;
|
||||
}
|
||||
void* M_Calloc(size_t v1, size_t v2);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue