[Bf-blender-cvs] [139a651434b] retopo_transform: explicit tests against 0 rather than implicit bool coversion
jon denning
noreply at git.blender.org
Sat Jul 16 13:00:37 CEST 2022
Commit: 139a651434ba67ada560a37ec9fd93bcc0f0094d
Author: jon denning
Date: Tue Jun 7 11:56:06 2022 -0400
Branches: retopo_transform
https://developer.blender.org/rB139a651434ba67ada560a37ec9fd93bcc0f0094d
explicit tests against 0 rather than implicit bool coversion
===================================================================
M source/blender/editors/transform/transform_snap.c
===================================================================
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 2e3611b5182..dfe290c6425 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -734,10 +734,10 @@ static eSnapTargetSelect snap_select_target_get(TransInfo *t)
eSnapTargetSelect ret = SCE_SNAP_TARGET_ALL;
- bool use_snap_active = !(t->tsnap.target_select & SCE_SNAP_TARGET_NOT_ACTIVE);
- bool use_snap_edit = !(t->tsnap.target_select & SCE_SNAP_TARGET_NOT_EDITED);
- bool use_snap_nonedit = !(t->tsnap.target_select & SCE_SNAP_TARGET_NOT_NONEDITED);
- bool use_snap_selectable_only = (t->tsnap.target_select & SCE_SNAP_TARGET_ONLY_SELECTABLE);
+ bool use_snap_active = (t->tsnap.target_select & SCE_SNAP_TARGET_NOT_ACTIVE) == 0;
+ bool use_snap_edit = (t->tsnap.target_select & SCE_SNAP_TARGET_NOT_EDITED) == 0;
+ bool use_snap_nonedit = (t->tsnap.target_select & SCE_SNAP_TARGET_NOT_NONEDITED) == 0;
+ bool use_snap_selectable_only = (t->tsnap.target_select & SCE_SNAP_TARGET_ONLY_SELECTABLE) != 0;
if (ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE) && !(t->options & CTX_CAMERA)) {
if (base_act && (base_act->object->mode & OB_MODE_PARTICLE_EDIT)) {
More information about the Bf-blender-cvs
mailing list