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/render
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/render')
-rw-r--r--source/blender/render/intern/source/imagetexture.c4
-rw-r--r--source/blender/render/intern/source/pipeline.c4
-rw-r--r--source/blender/render/intern/source/pointdensity.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 9672184cec8..dc7288234b3 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -842,8 +842,8 @@ static void area_sample(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata
xsd = 1.f / xsam;
ysd = 1.f / ysam;
texr->tr = texr->tg = texr->tb = texr->ta = 0.f;
- for (ys = 0; ys < ysam; ++ys) {
- for (xs = 0; xs < xsam; ++xs) {
+ for (ys = 0; ys < ysam; ys++) {
+ for (xs = 0; xs < xsam; xs++) {
const float su = (xs + ((ys & 1) + 0.5f) * 0.5f) * xsd - 0.5f;
const float sv = (ys + ((xs & 1) + 0.5f) * 0.5f) * ysd - 0.5f;
const float pu = fx + su * AFD->dxt[0] + sv * AFD->dyt[0];
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 04fcaf206d4..8308048ddba 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -926,8 +926,8 @@ static void render_result_rescale(Render *re)
scale_x = (float)result->rectx / re->result->rectx;
scale_y = (float)result->recty / re->result->recty;
- for (x = 0; x < re->result->rectx; ++x) {
- for (y = 0; y < re->result->recty; ++y) {
+ for (x = 0; x < re->result->rectx; x++) {
+ for (y = 0; y < re->result->recty; y++) {
int src_x = x * scale_x;
int src_y = y * scale_y;
int dst_index = y * re->result->rectx + x;
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 3ede55434b9..cb33492763a 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -355,11 +355,11 @@ static void pointdensity_cache_vertex_weight(PointDensity *pd,
return;
}
- for (i = 0, dv = mdef; i < totvert; ++i, ++dv, data_color += 3) {
+ for (i = 0, dv = mdef; i < totvert; i++, dv++, data_color += 3) {
MDeformWeight *dw;
int j;
- for (j = 0, dw = dv->dw; j < dv->totweight; ++j, ++dw) {
+ for (j = 0, dw = dv->dw; j < dv->totweight; j++, dw++) {
if (dw->def_nr == mdef_index) {
copy_v3_fl(data_color, dw->weight);
break;
@@ -910,8 +910,8 @@ static void point_density_sample_func(void *__restrict data_v,
}
size_t z = (size_t)iter;
- for (size_t y = 0; y < resolution; ++y) {
- for (size_t x = 0; x < resolution; ++x) {
+ for (size_t y = 0; y < resolution; y++) {
+ for (size_t x = 0; x < resolution; x++) {
size_t index = z * resolution2 + y * resolution + x;
float texvec[3];
float age, vec[3], col[3];