Skip to content

Commit b8876c6

Browse files
committed
simplify GlobalAllocPtr inline (make it a macro..)
1 parent c3f0b4a commit b8876c6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/libmodplug/stdafx.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,8 @@ inline LONG MulDiv (long a, long b, long c)
107107
#define WAVE_FORMAT_PCM 1
108108

109109
#define GHND 0
110+
#define GlobalAllocPtr(__f,__siz) calloc(1,(__siz))
110111
#define GlobalFreePtr(p) free((void *)(p))
111-
inline int8_t * GlobalAllocPtr(unsigned int, size_t size)
112-
{
113-
int8_t * p = (int8_t *) malloc(size);
114-
115-
if (p != NULL) memset(p, 0, size);
116-
return p;
117-
}
118112

119113
inline void ProcessPlugins(int n) {}
120114

0 commit comments

Comments
 (0)