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/blenkernel/intern/particle.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/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 2de8d4a643a..312b8f883df 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -88,7 +88,7 @@ float PSYS_FRAND_BASE[PSYS_FRAND_COUNT];
void psys_init_rng(void)
{
RNG *rng = BLI_rng_new_srandom(5831); /* arbitrary */
- for (int i = 0; i < PSYS_FRAND_COUNT; ++i) {
+ for (int i = 0; i < PSYS_FRAND_COUNT; i++) {
PSYS_FRAND_BASE[i] = BLI_rng_get_float(rng);
PSYS_FRAND_SEED_OFFSET[i] = (unsigned int)BLI_rng_get_int(rng);
PSYS_FRAND_SEED_MULTIPLIER[i] = (unsigned int)BLI_rng_get_int(rng);
@@ -2747,7 +2747,7 @@ static void exec_child_path_cache(TaskPool *__restrict UNUSED(pool),
int i;
cpa = psys->child + task->begin;
- for (i = task->begin; i < task->end; ++i, ++cpa) {
+ for (i = task->begin; i < task->end; i++, cpa++) {
BLI_assert(i < psys->totchildcache);
psys_thread_create_path(task, cpa, cache[i], i);
}
@@ -2794,7 +2794,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim,
/* cache parent paths */
ctx.parent_pass = 1;
psys_tasks_create(&ctx, 0, totparent, &tasks_parent, &numtasks_parent);
- for (i = 0; i < numtasks_parent; ++i) {
+ for (i = 0; i < numtasks_parent; i++) {
ParticleTask *task = &tasks_parent[i];
psys_task_init_path(task, sim);
@@ -2805,7 +2805,7 @@ void psys_cache_child_paths(ParticleSimulationData *sim,
/* cache child paths */
ctx.parent_pass = 0;
psys_tasks_create(&ctx, totparent, totchild, &tasks_child, &numtasks_child);
- for (i = 0; i < numtasks_child; ++i) {
+ for (i = 0; i < numtasks_child; i++) {
ParticleTask *task = &tasks_child[i];
psys_task_init_path(task, sim);
@@ -3011,7 +3011,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re
if (part->type == PART_HAIR) {
HairKey *hkey;
- for (k = 0, hkey = pa->hair; k < pa->totkey; ++k, ++hkey) {
+ for (k = 0, hkey = pa->hair; k < pa->totkey; k++, hkey++) {
mul_v3_m4v3(hkey->world_co, hairmat, hkey->co);
}
}