Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 04:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commitaa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch)
tree1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/blenkernel/intern/screen.c
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r--source/blender/blenkernel/intern/screen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 0a28ed7e9a1..1b8360a1cec 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -962,7 +962,7 @@ ARegion *BKE_area_find_region_xy(ScrArea *area, const int regiontype, int x, int
if (area) {
ARegion *region;
for (region = area->regionbase.first; region; region = region->next) {
- if ((regiontype == RGN_TYPE_ANY) || (region->regiontype == regiontype)) {
+ if (ELEM(regiontype, RGN_TYPE_ANY, region->regiontype)) {
if (BLI_rcti_isect_pt(&region->winrct, x, y)) {
region_found = region;
break;
@@ -980,7 +980,7 @@ ARegion *BKE_screen_find_region_xy(bScreen *screen, const int regiontype, int x,
{
ARegion *region_found = NULL;
LISTBASE_FOREACH (ARegion *, region, &screen->regionbase) {
- if ((regiontype == RGN_TYPE_ANY) || (region->regiontype == regiontype)) {
+ if (ELEM(regiontype, RGN_TYPE_ANY, region->regiontype)) {
if (BLI_rcti_isect_pt(&region->winrct, x, y)) {
region_found = region;
break;
@@ -1017,7 +1017,7 @@ ScrArea *BKE_screen_find_big_area(bScreen *screen, const int spacetype, const sh
int size, maxsize = 0;
for (area = screen->areabase.first; area; area = area->next) {
- if ((spacetype == SPACE_TYPE_ANY) || (area->spacetype == spacetype)) {
+ if (ELEM(spacetype, SPACE_TYPE_ANY, area->spacetype)) {
if (min <= area->winx && min <= area->winy) {
size = area->winx * area->winy;
if (size > maxsize) {
@@ -1038,7 +1038,7 @@ ScrArea *BKE_screen_area_map_find_area_xy(const ScrAreaMap *areamap,
{
LISTBASE_FOREACH (ScrArea *, area, &areamap->areabase) {
if (BLI_rcti_isect_pt(&area->totrct, x, y)) {
- if ((spacetype == SPACE_TYPE_ANY) || (area->spacetype == spacetype)) {
+ if (ELEM(spacetype, SPACE_TYPE_ANY, area->spacetype)) {
return area;
}
break;