From 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 Sep 2019 00:12:26 +1000 Subject: Cleanup: use post increment/decrement When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender). --- source/blender/gpu/intern/gpu_material.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu/intern/gpu_material.c') 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); -- cgit v1.2.3