diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:01:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-19 09:28:17 +0300 |
commit | 14b2a35c8bfd6d77f6357f929ddd82845436725f (patch) | |
tree | 54746d6a3cf0da24b95d2a9761e6222656eb5249 /source/blender/editors/animation/keyframes_edit.c | |
parent | 17a2820da8ad8ea23d336129f32e060e5746b047 (diff) |
Cleanup: use parenthesis for if statements in macros
Diffstat (limited to 'source/blender/editors/animation/keyframes_edit.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 6f6b5232fa7..299aa1db4f5 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -515,19 +515,21 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac) #define KEYFRAME_OK_CHECKS(check) \ { \ CHECK_TYPE(ok, short); \ - if (check(1)) \ + if (check(1)) { \ ok |= KEYFRAME_OK_KEY; \ -\ + } \ if (ked && (ked->iterflags & KEYFRAME_ITER_INCL_HANDLES)) { \ /* Only act on visible items, so check handle visibility state. */ \ const bool handles_visible = ((ked->iterflags & KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE) ? \ (BEZT_ISSEL_ANY(bezt)) : \ true); \ if (handles_visible) { \ - if (check(0)) \ + if (check(0)) { \ ok |= KEYFRAME_OK_H1; \ - if (check(2)) \ + } \ + if (check(2)) { \ ok |= KEYFRAME_OK_H2; \ + } \ } \ } \ } \ @@ -1054,10 +1056,12 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short mode) */ #define ENSURE_HANDLES_MATCH(bezt) \ if (bezt->h1 != bezt->h2) { \ - if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \ + if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) { \ bezt->h1 = HD_FREE; \ - if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \ + } \ + if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) { \ bezt->h2 = HD_FREE; \ + } \ } \ (void)0 |