From aa3a4973a30ff668a62447e18ac41f6c916b4a8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Nov 2020 12:30:59 +1100 Subject: Cleanup: use ELEM macro --- source/blender/editors/space_view3d/view3d_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_view3d/view3d_utils.c') diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 3f7d6142758..22cdbb090a5 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -303,8 +303,8 @@ void ED_view3d_clipping_calc( /* four clipping planes and bounding volume */ /* first do the bounding volume */ for (int val = 0; val < 4; val++) { - float xs = (val == 0 || val == 3) ? rect->xmin : rect->xmax; - float ys = (val == 0 || val == 1) ? rect->ymin : rect->ymax; + float xs = (ELEM(val, 0, 3)) ? rect->xmin : rect->xmax; + float ys = (ELEM(val, 0, 1)) ? rect->ymin : rect->ymax; ED_view3d_unproject(region, xs, ys, 0.0, bb->vec[val]); ED_view3d_unproject(region, xs, ys, 1.0, bb->vec[4 + val]); -- cgit v1.2.3