Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-07 08:27:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-07 08:27:40 +0400
commit2a35e8f9c140d082c6292efcf5b05f52aee6c95e (patch)
treee38d5fbfa201b96c36ba7383d446ae743cc0d108 /source
parent4b0b3f578c9c686b787c6e86f9d7bae42728fd70 (diff)
remove BMEMSET define, use memset instead
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c8
-rw-r--r--source/blender/blenlib/BLI_cellalloc.h4
-rw-r--r--source/blender/blenlib/BLI_edgehash.h4
-rw-r--r--source/blender/blenlib/BLI_utildefines.h2
-rw-r--r--source/blender/blenlib/intern/BLI_cellalloc.c7
-rw-r--r--source/blender/modifiers/intern/MOD_ngoninterp.c1
6 files changed, 12 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 220e048a76b..3297417eb8c 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -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"
diff --git a/source/blender/blenlib/BLI_cellalloc.h b/source/blender/blenlib/BLI_cellalloc.h
index a6e779d5990..7309baf8fdf 100644
--- a/source/blender/blenlib/BLI_cellalloc.h
+++ b/source/blender/blenlib/BLI_cellalloc.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);
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index c64ebcbb4f5..0538932c8a5 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -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;
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 9ca57493acb..a6b4f2c9b92 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -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
diff --git a/source/blender/blenlib/intern/BLI_cellalloc.c b/source/blender/blenlib/intern/BLI_cellalloc.c
index 51a244b4bce..ff77dc444af 100644
--- a/source/blender/blenlib/intern/BLI_cellalloc.c
+++ b/source/blender/blenlib/intern/BLI_cellalloc.c
@@ -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;
}
diff --git a/source/blender/modifiers/intern/MOD_ngoninterp.c b/source/blender/modifiers/intern/MOD_ngoninterp.c
index 0c5995fa3d4..60833463d2f 100644
--- a/source/blender/modifiers/intern/MOD_ngoninterp.c
+++ b/source/blender/modifiers/intern/MOD_ngoninterp.c
@@ -32,6 +32,7 @@
* \ingroup modifiers
*/
+#include <string.h>
#include "MEM_guardedalloc.h"