Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes)

This commit is contained in:
2014-04-27 00:24:11 +10:00
parent 88a0fe5f1b
commit 7ca74fc1c0
25 changed files with 46 additions and 46 deletions

View File

@@ -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),