diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:24:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:16 +0400 |
commit | 7ca74fc1c008355b84c08bcadb56ea6acabce2f3 (patch) | |
tree | 6823cc2e0945928dbabb3e4735380128d61eace2 /source/blender/gpu/intern/gpu_buffers.c | |
parent | 88a0fe5f1bc52ebd918be1f63af57cf0f9d594d1 (diff) |
Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes)
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 194ea2b3b81..a30918a175d 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -736,7 +736,7 @@ static void GPU_buffer_copy_normal(DerivedMesh *dm, float *varray, int *index, i int start; float f_no[3]; - float *nors = dm->getTessFaceDataArray(dm, CD_NORMAL); + const float *nors = dm->getTessFaceDataArray(dm, CD_NORMAL); short (*tlnors)[4][3] = dm->getTessFaceDataArray(dm, CD_TESSLOOPNORMAL); MVert *mvert = dm->getVertArray(dm); MFace *f = dm->getTessFaceArray(dm); @@ -1384,7 +1384,7 @@ struct GPU_PBVH_Buffers { /* mesh pointers in case buffer allocation fails */ MFace *mface; MVert *mvert; - int *face_indices; + const int *face_indices; int totface; const float *vmask; @@ -1393,7 +1393,7 @@ struct GPU_PBVH_Buffers { CCGElem **grids; const DMFlagMat *grid_flag_mats; BLI_bitmap * const *grid_hidden; - int *grid_indices; + const int *grid_indices; int totgrid; int has_hidden; @@ -1908,7 +1908,7 @@ static GLuint gpu_get_grid_buffer(int gridsize, GLenum *index_type, unsigned *to /* used in the FILL_QUAD_BUFFER macro */ BLI_bitmap * const *grid_hidden = NULL; - int *grid_indices = NULL; + const int *grid_indices = NULL; int totgrid = 1; /* VBO is disabled; delete the previous buffer (if it exists) and @@ -2520,7 +2520,7 @@ void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial, glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); if (buffers->tot_quad) { - char *offset = 0; + const char *offset = 0; int i, last = buffers->has_hidden ? 1 : buffers->totgrid; for (i = 0; i < last; i++) { glVertexPointer(3, GL_FLOAT, sizeof(VertexBufferFormat), |