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>2014-04-26 18:24:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-26 18:25:16 +0400
commit7ca74fc1c008355b84c08bcadb56ea6acabce2f3 (patch)
tree6823cc2e0945928dbabb3e4735380128d61eace2 /source/blender/gpu
parent88a0fe5f1bc52ebd918be1f63af57cf0f9d594d1 (diff)
Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes)
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c10
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
3 files changed, 7 insertions, 7 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),
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 97084f7a887..1845de16780 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -85,7 +85,7 @@ extern Material defmaterial; /* from material.c */
static void gpu_mcol(unsigned int ucol)
{
/* mcol order is swapped */
- char *cp= (char *)&ucol;
+ const char *cp= (char *)&ucol;
glColor3ub(cp[3], cp[2], cp[1]);
}
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 5c3bf6eb8e2..cd256a570d0 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -330,7 +330,7 @@ struct GPUTexture {
static unsigned char *GPU_texture_convert_pixels(int length, float *fpixels)
{
unsigned char *pixels, *p;
- float *fp;
+ const float *fp;
int a, len;
len = 4*length;