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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-03 09:38:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-03 09:38:28 +0400
commit48aa356b7b071307aff2e8835431d0e7474aee1d (patch)
treeef8527006d86653e247298124d6a4c2dfd8c7764
parent17c2621fd1dc3e9e9624bab747c7c91f8582b716 (diff)
use const for bm_mesh_allocsize_default, bm_mesh_chunksize_default
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index ba5e7569c31..d304e18bfa5 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -42,8 +42,8 @@
#include "intern/bmesh_private.h"
/* used as an extern, defined in bmesh.h */
-BMAllocTemplate bm_mesh_allocsize_default = {512, 1024, 2048, 512};
-BMAllocTemplate bm_mesh_chunksize_default = {512, 1024, 2048, 512};
+const BMAllocTemplate bm_mesh_allocsize_default = {512, 1024, 2048, 512};
+const BMAllocTemplate bm_mesh_chunksize_default = {512, 1024, 2048, 512};
static void bm_mempool_init(BMesh *bm, const BMAllocTemplate *allocsize)
{
@@ -109,7 +109,7 @@ void BM_mesh_elem_toolflags_clear(BMesh *bm)
*
* \note ob is needed by multires
*/
-BMesh *BM_mesh_create(BMAllocTemplate *allocsize)
+BMesh *BM_mesh_create(const BMAllocTemplate *allocsize)
{
/* allocate the structure */
BMesh *bm = MEM_callocN(sizeof(BMesh), __func__);
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index b592f863cd1..8baba568fb8 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -31,7 +31,7 @@ struct BMAllocTemplate;
void BM_mesh_elem_toolflags_ensure(BMesh *bm);
void BM_mesh_elem_toolflags_clear(BMesh *bm);
-BMesh *BM_mesh_create(struct BMAllocTemplate *allocsize);
+BMesh *BM_mesh_create(const struct BMAllocTemplate *allocsize);
void BM_mesh_free(BMesh *bm);
void BM_mesh_data_free(BMesh *bm);
@@ -57,8 +57,8 @@ typedef struct BMAllocTemplate {
int totvert, totedge, totloop, totface;
} BMAllocTemplate;
-extern BMAllocTemplate bm_mesh_allocsize_default;
-extern BMAllocTemplate bm_mesh_chunksize_default;
+extern const BMAllocTemplate bm_mesh_allocsize_default;
+extern const BMAllocTemplate bm_mesh_chunksize_default;
enum {
BM_MESH_CREATE_USE_TOOLFLAGS = (1 << 0)