diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-09 01:35:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-09 02:13:43 +0300 |
commit | 21462565632b876ac4eadf2bd30573f2fda70c76 (patch) | |
tree | 483da4fc20c4c8cc7198abd6edd5f3a53aa90b91 /source/blender/makesrna/intern/rna_xr.c | |
parent | 626c844105afc3b2455f5a1b87ac8a7839a7e0bf (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/makesrna/intern/rna_xr.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_xr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_xr.c b/source/blender/makesrna/intern/rna_xr.c index 9fe3153eb1e..d8be9b7e80d 100644 --- a/source/blender/makesrna/intern/rna_xr.c +++ b/source/blender/makesrna/intern/rna_xr.c @@ -33,7 +33,7 @@ static wmXrData *rna_XrSession_wm_xr_data_get(PointerRNA *ptr) /* Callers could also get XrSessionState pointer through ptr->data, but prefer if we just * consistently pass wmXrData pointers to the WM_xr_xxx() API. */ - BLI_assert((ptr->type == &RNA_XrSessionSettings) || (ptr->type == &RNA_XrSessionState)); + BLI_assert(ELEM(ptr->type, &RNA_XrSessionSettings, &RNA_XrSessionState)); wmWindowManager *wm = (wmWindowManager *)ptr->owner_id; BLI_assert(wm && (GS(wm->id.name) == ID_WM)); @@ -739,7 +739,7 @@ static bool rna_XrSessionState_action_create(bContext *C, return false; } - const bool is_float_action = (ami->type == XR_FLOAT_INPUT || ami->type == XR_VECTOR2F_INPUT); + const bool is_float_action = ELEM(ami->type, XR_FLOAT_INPUT, XR_VECTOR2F_INPUT); const bool is_button_action = (is_float_action || ami->type == XR_BOOLEAN_INPUT); wmOperatorType *ot = NULL; IDProperty *op_properties = NULL; @@ -791,7 +791,7 @@ static bool rna_XrSessionState_action_binding_create(bContext *C, return false; } - const bool is_float_action = (ami->type == XR_FLOAT_INPUT || ami->type == XR_VECTOR2F_INPUT); + const bool is_float_action = ELEM(ami->type, XR_FLOAT_INPUT, XR_VECTOR2F_INPUT); const bool is_button_action = (is_float_action || ami->type == XR_BOOLEAN_INPUT); const bool is_pose_action = (ami->type == XR_POSE_INPUT); float float_thresholds[2]; |