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/render | |
parent | 35bb5465ae7f7fbd234b4b3c650902bc42f3d3f1 (diff) |
code cleanup: use const's for static arrays
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/imagetexture.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pixelshading.c | 8 | ||||
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index c5e4f97c6bc..bfc13bf6151 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -799,7 +799,7 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata /* table of (exp(ar) - exp(a)) / (1 - exp(a)) for r in range [0, 1] and a = -2 * used instead of actual gaussian, otherwise at high texture magnifications circular artifacts are visible */ #define EWA_MAXIDX 255 -static float EWA_WTS[EWA_MAXIDX + 1] = { +static const float EWA_WTS[EWA_MAXIDX + 1] = { 1.f, 0.990965f, 0.982f, 0.973105f, 0.96428f, 0.955524f, 0.946836f, 0.938216f, 0.929664f, 0.921178f, 0.912759f, 0.904405f, 0.896117f, 0.887893f, 0.879734f, 0.871638f, 0.863605f, 0.855636f, 0.847728f, 0.839883f, 0.832098f, 0.824375f, 0.816712f, 0.809108f, 0.801564f, diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 8a023a2c009..43e052a6efc 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -73,7 +73,7 @@ extern struct Render R; /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -extern float hashvectf[]; +extern const float hashvectf[]; static void render_lighting_halo(HaloRen *har, float col_r[3]) { @@ -341,7 +341,8 @@ int shadeHaloFloat(HaloRen *har, float col[4], int zz, if (flarec) har->pixels+= (int)(har->rad-radist); if (har->ringc) { - float *rc, fac; + const float *rc; + float fac; int ofs; /* per ring an antialised circle */ @@ -393,7 +394,8 @@ int shadeHaloFloat(HaloRen *har, float col[4], int zz, dist= 0.0f; if (har->linec) { - float *rc, fac; + const float *rc; + float fac; int ofs; /* per starpoint an antialiased line */ diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 982e9b1a410..89d8345a0d7 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -1875,10 +1875,11 @@ static void renderhalo_post(RenderResult *rr, float *rectf, HaloRen *har) /* pos static void renderflare(RenderResult *rr, float *rectf, HaloRen *har) { - extern float hashvectf[]; + extern const float hashvectf[]; HaloRen fla; Material *ma; - float *rc, rad, alfa, visifac, vec[3]; + const float *rc; + float rad, alfa, visifac, vec[3]; int b, type; fla= *har; |