diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-09 18:55:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-09 19:22:45 +0300 |
commit | 4443c4082ed094baf11b5c6cff280582776466b6 (patch) | |
tree | e2878edc62e22635e9feb589a5f9590c4fdf5d87 /source/blender/blenkernel/intern | |
parent | bda8887e0cdfd2fc035b6f1d97f16120f719c6a3 (diff) |
Cleanup: remove redundant checks which have already been tested
Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 2539b990210..21b86aa8148 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -1522,7 +1522,7 @@ void BKE_rigidbody_remove_object(Main *bmain, Scene *scene, Object *ob, const bo if (rbw) { /* remove object from array */ - if (rbw && rbw->objects) { + if (rbw->objects) { for (i = 0; i < rbw->numbodies; i++) { if (rbw->objects[i] == ob) { rbw->objects[i] = NULL; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index a58db89ad0c..86d4c03d51a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -3787,9 +3787,7 @@ void BKE_scene_eval_sequencer_sequences(Depsgraph *depsgraph, Scene *scene) SEQ_ALL_BEGIN (scene->ed, seq) { if (seq->scene_sound == NULL) { if (seq->sound != NULL) { - if (seq->scene_sound == NULL) { - seq->scene_sound = BKE_sound_add_scene_sound_defaults(scene, seq); - } + seq->scene_sound = BKE_sound_add_scene_sound_defaults(scene, seq); } else if (seq->type == SEQ_TYPE_SCENE) { if (seq->scene != NULL) { |