diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 02:45:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 03:16:43 +0300 |
commit | b280699078eee23bd8eb572668d6f0d8972d879a (patch) | |
tree | 8b6b8461938e71914d28e707137a8960f8a2d03c /source/blender/windowmanager | |
parent | ef9269bd62f31e39d39cc59cd34354b53eae6661 (diff) |
Cleanup: use elem macros
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/xr/intern/wm_xr_action.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 7e8910644b6..dffbea64a30 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -505,8 +505,7 @@ void wm_event_do_notifiers(bContext *C) } } - if (note->window == win || - (note->window == NULL && (note->reference == NULL || note->reference == scene))) { + if (note->window == win || (note->window == NULL && (ELEM(note->reference, NULL, scene)))) { if (note->category == NC_SCENE) { if (note->data == ND_FRAME) { do_anim = true; diff --git a/source/blender/windowmanager/xr/intern/wm_xr_action.c b/source/blender/windowmanager/xr/intern/wm_xr_action.c index ba347c537ec..b5a606b4298 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_action.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_action.c @@ -118,7 +118,7 @@ static wmXrAction *action_create(const char *action_name, action->states = MEM_calloc_arrayN(count, size, "XrAction_States"); action->states_prev = MEM_calloc_arrayN(count, size, "XrAction_StatesPrev"); - const bool is_float_action = (type == XR_FLOAT_INPUT || type == XR_VECTOR2F_INPUT); + const bool is_float_action = ELEM(type, XR_FLOAT_INPUT, XR_VECTOR2F_INPUT); const bool is_button_action = (is_float_action || type == XR_BOOLEAN_INPUT); if (is_float_action) { action->float_thresholds = MEM_calloc_arrayN( |