diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/editors/screen/screen_edit.c | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 5f56bbaef9d..5e67d6855c0 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -362,7 +362,7 @@ static void screen_areas_align( { wmWindow *win = CTX_wm_window(C); - if (dir == 0 || dir == 2) { + if (ELEM(dir, 0, 2)) { /* horizontal join, use average for new top and bottom. */ int top = (sa1->v2->vec.y + sa2->v2->vec.y) / 2; int bottom = (sa1->v4->vec.y + sa2->v4->vec.y) / 2; @@ -687,7 +687,7 @@ static void screen_cursor_set(wmWindow *win, const int xy[2]) WM_cursor_set(win, WM_CURSOR_EDIT); } else if (az->type == AZONE_REGION) { - if (az->edge == AE_LEFT_TO_TOPRIGHT || az->edge == AE_RIGHT_TO_TOPLEFT) { + if (ELEM(az->edge, AE_LEFT_TO_TOPRIGHT, AE_RIGHT_TO_TOPLEFT)) { WM_cursor_set(win, WM_CURSOR_X_MOVE); } else { @@ -772,7 +772,7 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) } } - if (region == region_prev || region == screen->active_region) { + if (ELEM(region, region_prev, screen->active_region)) { do_draw = true; } } |