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:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 12:49:59 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 13:01:40 +0300
commit156448ba4ba350dd6f9718b4610f14f4ba187af6 (patch)
tree5ad43590fbf4d7536f58a38935cbbac3c2ec27bd /source/blender/draw/intern/draw_cache_impl_particles.c
parent88cc3f167f7ee404640289ed9cfd6b13f0494d98 (diff)
Cleanup: Draw, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/draw` module. Not all warnings are addressed in this commit. No functional changes.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_particles.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_particles.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
index 331a1f80bec..3ecdbff1e96 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.c
+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
@@ -128,9 +128,8 @@ static bool particle_batch_cache_valid(ParticleSystem *psys)
if (cache->is_dirty == false) {
return true;
}
- else {
- return false;
- }
+
+ return false;
return true;
}
@@ -647,14 +646,13 @@ static float particle_key_weight(const ParticleData *particle, int strand, float
if (t == 1.0) {
return hkeys[part->totkey - 1].weight;
}
- else {
- float interp = t / edit_key_seg_t;
- int index = (int)interp;
- interp -= floorf(interp); /* Time between 2 edit key */
- float s1 = hkeys[index].weight;
- float s2 = hkeys[index + 1].weight;
- return s1 + interp * (s2 - s1);
- }
+
+ float interp = t / edit_key_seg_t;
+ int index = (int)interp;
+ interp -= floorf(interp); /* Time between 2 edit key */
+ float s1 = hkeys[index].weight;
+ float s2 = hkeys[index + 1].weight;
+ return s1 + interp * (s2 - s1);
}
static int particle_batch_cache_fill_segments_edit(