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>2020-03-15 13:48:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-15 13:48:35 +0300
commit4be4c06671551da62edf197df6e7ad8c89dc2fe0 (patch)
tree17592201ff98be5c4d6fbd69b9f8c102a168365e /source/blender/editors/object/object_modes.c
parent80edc0e972a2dde85509968832ce21f46d86ce58 (diff)
Cleanup: redundant checks
In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.
Diffstat (limited to 'source/blender/editors/object/object_modes.c')
-rw-r--r--source/blender/editors/object/object_modes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c
index edc2f15813c..f06b6a4db2a 100644
--- a/source/blender/editors/object/object_modes.c
+++ b/source/blender/editors/object/object_modes.c
@@ -282,7 +282,9 @@ static bool ed_object_mode_generic_exit_ex(struct Main *bmain,
ED_object_posemode_exit_ex(bmain, ob);
}
}
- else if ((ob->type == OB_GPENCIL) && ((ob->mode & OB_MODE_OBJECT) == 0)) {
+ else if (ob->type == OB_GPENCIL) {
+ /* Accounted for above. */
+ BLI_assert((ob->mode & OB_MODE_OBJECT) == 0);
if (only_test) {
return true;
}