diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-11 00:22:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-11 00:22:17 +0400 |
commit | afab39b9d6a4b3283c42c5b6d7d787fda56327de (patch) | |
tree | fc58fee1db5ed21160a63be7c4f6716a67cee026 /source/blender/editors | |
parent | 35bb5465ae7f7fbd234b4b3c650902bc42f3d3f1 (diff) |
code cleanup: use const's for static arrays
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 16 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 0bcb550b930..9b858a2c4e9 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -58,7 +58,7 @@ #include "curve_intern.h" -static float nurbcircle[8][2] = { +static const float nurbcircle[8][2] = { {0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0}, {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0} }; diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 2634dd3ec08..de6fafb2cd8 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -304,7 +304,7 @@ static void set_ebone_glColor(const unsigned int boneflag) /* *************** Armature drawing, helper calls for parts ******************* */ /* half the cube, in Y */ -static float cube[8][3] = { +static const float cube[8][3] = { {-1.0, 0.0, -1.0}, {-1.0, 0.0, 1.0}, {-1.0, 1.0, 1.0}, @@ -440,7 +440,7 @@ static void draw_bonevert_solid(void) glCallList(displist); } -static float bone_octahedral_verts[6][3] = { +static const float bone_octahedral_verts[6][3] = { { 0.0f, 0.0f, 0.0f}, { 0.1f, 0.1f, 0.1f}, { 0.1f, 0.1f, -0.1f}, @@ -449,10 +449,10 @@ static float bone_octahedral_verts[6][3] = { { 0.0f, 1.0f, 0.0f} }; -static unsigned int bone_octahedral_wire_sides[8] = {0, 1, 5, 3, 0, 4, 5, 2}; -static unsigned int bone_octahedral_wire_square[8] = {1, 2, 3, 4, 1}; +static const unsigned int bone_octahedral_wire_sides[8] = {0, 1, 5, 3, 0, 4, 5, 2}; +static const unsigned int bone_octahedral_wire_square[8] = {1, 2, 3, 4, 1}; -static unsigned int bone_octahedral_solid_tris[8][3] = { +static const unsigned int bone_octahedral_solid_tris[8][3] = { {2, 1, 0}, /* bottom */ {3, 2, 0}, {4, 3, 0}, @@ -465,7 +465,7 @@ static unsigned int bone_octahedral_solid_tris[8][3] = { }; /* aligned with bone_octahedral_solid_tris */ -static float bone_octahedral_solid_normals[8][3] = { +static const float bone_octahedral_solid_normals[8][3] = { { 0.70710683f, -0.70710683f, 0.00000000f}, {-0.00000000f, -0.70710683f, -0.70710683f}, {-0.70710683f, -0.70710683f, 0.00000000f}, @@ -599,7 +599,7 @@ static void draw_bone_points(const short dt, int armflag, unsigned int boneflag, } /* 16 values of sin function (still same result!) */ -static float si[16] = { +static const float si[16] = { 0.00000000f, 0.20129852f, 0.39435585f, 0.57126821f, 0.72479278f, @@ -611,7 +611,7 @@ static float si[16] = { 0.10116832f }; /* 16 values of cos function (still same result!) */ -static float co[16] = { +static const float co[16] = { 1.00000000f, 0.97952994f, 0.91895781f, 0.82076344f, 0.68896691f, diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index e7c22fc0899..2904b37c2e5 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -60,7 +60,7 @@ typedef struct TransformModeItem { void (*opfunc)(wmOperatorType *); } TransformModeItem; -static float VecOne[3] = {1, 1, 1}; +static const float VecOne[3] = {1, 1, 1}; static char OP_TRANSLATION[] = "TRANSFORM_OT_translate"; static char OP_ROTATION[] = "TRANSFORM_OT_rotate"; |