mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 15:32:24 +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;
|
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
|
#else
|
||||||
void *M_Malloc(size_t size)
|
void *M_Malloc(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -121,6 +114,14 @@ void *M_Realloc(void *memblock, size_t size)
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void* M_Calloc(size_t v1, size_t v2)
|
||||||
|
{
|
||||||
|
auto p = M_Malloc(v1 * v2);
|
||||||
|
memset(p, 0, v1 * v2);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
|
|
Loading…
Reference in a new issue