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>2019-09-07 17:12:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-07 17:23:25 +0300
commit0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch)
tree0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/gpu/intern/gpu_material.c
parentab823176d31dc155645de733f1cd4fbd6ad74592 (diff)
Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 05d991105c0..7e254d802f0 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -333,7 +333,7 @@ static float eval_integral(float x0, float x1, short falloff_type, float sharpne
const float step = range / INTEGRAL_RESOLUTION;
float integral = 0.0f;
- for (int i = 0; i < INTEGRAL_RESOLUTION; ++i) {
+ for (int i = 0; i < INTEGRAL_RESOLUTION; i++) {
float x = x0 + range * ((float)i + 0.5f) / (float)INTEGRAL_RESOLUTION;
float y = eval_profile(x, falloff_type, sharpness, param);
integral += y * step;
@@ -414,7 +414,7 @@ static void compute_sss_kernel(
sum[2] += kd->kernel[i][2];
}
- for (int i = 0; i < 3; ++i) {
+ for (int i = 0; i < 3; i++) {
if (sum[i] > 0.0f) {
/* Normalize */
for (int j = 0; j < sample_len; j++) {
@@ -450,7 +450,7 @@ static void compute_sss_translucence_kernel(const GPUSssKernelData *kd,
*output = (float *)texels;
/* Last texel should be black, hence the - 1. */
- for (int i = 0; i < resolution - 1; ++i) {
+ for (int i = 0; i < resolution - 1; i++) {
/* Distance from surface. */
float d = kd->max_radius * ((float)i + 0.00001f) / ((float)resolution);