remove BMEMSET define, use memset instead
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
@@ -55,10 +59,6 @@
|
||||
#include "GPU_extensions.h"
|
||||
#include "GPU_material.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
/* bmesh */
|
||||
#include "BKE_tessmesh.h"
|
||||
#include "BLI_array.h"
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
- joeedh
|
||||
*/
|
||||
|
||||
void *BLI_cellalloc_malloc(long size, const char *tag);
|
||||
void *BLI_cellalloc_calloc(long size, const char *tag);
|
||||
void *BLI_cellalloc_malloc(int size, const char *tag);
|
||||
void *BLI_cellalloc_calloc(int size, const char *tag);
|
||||
void BLI_cellalloc_free(void *mem);
|
||||
void BLI_cellalloc_printleaks(void);
|
||||
int BLI_cellalloc_get_totblock(void);
|
||||
|
||||
@@ -150,8 +150,8 @@ BM_INLINE void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) {
|
||||
|
||||
eh->nbuckets= _ehash_hashsizes[++eh->cursize];
|
||||
eh->buckets= MEM_mallocN(eh->nbuckets*sizeof(*eh->buckets), "eh buckets");
|
||||
BMEMSET(eh->buckets, 0, eh->nbuckets*sizeof(*eh->buckets));
|
||||
|
||||
memset(eh->buckets, 0, eh->nbuckets * sizeof(*eh->buckets));
|
||||
|
||||
for (i=0; i<nold; i++) {
|
||||
for (e= old[i]; e;) {
|
||||
EdgeEntry *n= e->next;
|
||||
|
||||
@@ -302,6 +302,4 @@ do { \
|
||||
# define BLI_assert(a) (void)0
|
||||
#endif
|
||||
|
||||
#define BMEMSET(mem, val, size) {unsigned int _i, _size = (size); char *_c = (char*) mem; for (_i=0; _i<_size; _i++) *_c++ = val;}
|
||||
|
||||
#endif // BLI_UTILDEFINES_H
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef struct MemHeader {
|
||||
|
||||
//#define USE_GUARDEDALLOC
|
||||
|
||||
void *BLI_cellalloc_malloc(long size, const char *tag)
|
||||
void *BLI_cellalloc_malloc(int size, const char *tag)
|
||||
{
|
||||
MemHeader *memh;
|
||||
int slot = size + sizeof(MemHeader);
|
||||
@@ -112,11 +112,10 @@ void *BLI_cellalloc_malloc(long size, const char *tag)
|
||||
return memh + 1;
|
||||
}
|
||||
|
||||
void *BLI_cellalloc_calloc(long size, const char *tag)
|
||||
void *BLI_cellalloc_calloc(int size, const char *tag)
|
||||
{
|
||||
void *mem = BLI_cellalloc_malloc(size, tag);
|
||||
BMEMSET(mem, 0, size);
|
||||
|
||||
memset(mem, 0, size);
|
||||
return mem;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
* \ingroup modifiers
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user