mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-22 12:11:17 +00:00
move M_Calloc out of the #ifndef BSD etc... block.
This commit is contained in:
parent
f399caa69d
commit
f4e479d39d
1 changed files with 8 additions and 7 deletions
|
@ -78,13 +78,6 @@ void *M_Realloc(void *memblock, size_t size)
|
|||
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)
|
||||
{
|
||||
|
@ -121,6 +114,14 @@ void *M_Realloc(void *memblock, size_t size)
|
|||
return block;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* M_Calloc(size_t v1, size_t v2)
|
||||
{
|
||||
auto p = M_Malloc(v1 * v2);
|
||||
memset(p, 0, v1 * v2);
|
||||
return p;
|
||||
}
|
||||
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
|
|
Loading…
Reference in a new issue