[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42477] branches/bmesh/blender/source/ blender: remove BMEMSET define, use memset instead
Campbell Barton
ideasman42 at gmail.com
Wed Dec 7 05:27:53 CET 2011
Revision: 42477
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42477
Author: campbellbarton
Date: 2011-12-07 04:27:40 +0000 (Wed, 07 Dec 2011)
Log Message:
-----------
remove BMEMSET define, use memset instead
Modified Paths:
--------------
branches/bmesh/blender/source/blender/blenkernel/intern/editderivedmesh.c
branches/bmesh/blender/source/blender/blenlib/BLI_cellalloc.h
branches/bmesh/blender/source/blender/blenlib/BLI_edgehash.h
branches/bmesh/blender/source/blender/blenlib/BLI_utildefines.h
branches/bmesh/blender/source/blender/blenlib/intern/BLI_cellalloc.c
branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c
Modified: branches/bmesh/blender/source/blender/blenkernel/intern/editderivedmesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/editderivedmesh.c 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/editderivedmesh.c 2011-12-07 04:27:40 UTC (rev 42477)
@@ -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"
Modified: branches/bmesh/blender/source/blender/blenlib/BLI_cellalloc.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_cellalloc.h 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/blenlib/BLI_cellalloc.h 2011-12-07 04:27:40 UTC (rev 42477)
@@ -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);
Modified: branches/bmesh/blender/source/blender/blenlib/BLI_edgehash.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_edgehash.h 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/blenlib/BLI_edgehash.h 2011-12-07 04:27:40 UTC (rev 42477)
@@ -150,8 +150,8 @@
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;
Modified: branches/bmesh/blender/source/blender/blenlib/BLI_utildefines.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_utildefines.h 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/blenlib/BLI_utildefines.h 2011-12-07 04:27:40 UTC (rev 42477)
@@ -302,6 +302,4 @@
# 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
Modified: branches/bmesh/blender/source/blender/blenlib/intern/BLI_cellalloc.c
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/intern/BLI_cellalloc.c 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/blenlib/intern/BLI_cellalloc.c 2011-12-07 04:27:40 UTC (rev 42477)
@@ -69,7 +69,7 @@
//#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 @@
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;
}
Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c 2011-12-07 01:12:53 UTC (rev 42476)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c 2011-12-07 04:27:40 UTC (rev 42477)
@@ -32,6 +32,7 @@
* \ingroup modifiers
*/
+#include <string.h>
#include "MEM_guardedalloc.h"
More information about the Bf-blender-cvs
mailing list