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/editors/screen/area.c
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index cffcb1cb4dc..720d4608125 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1385,7 +1385,7 @@ static void region_rect_recursive(
region->winrct = *remainder;
BLI_rcti_init(remainder, 0, 0, 0, 0);
}
- else if (alignment == RGN_ALIGN_TOP || alignment == RGN_ALIGN_BOTTOM) {
+ else if (ELEM(alignment, RGN_ALIGN_TOP, RGN_ALIGN_BOTTOM)) {
rcti *winrct = (region->overlap) ? overlap_remainder : remainder;
if ((prefsizey == 0) || (rct_fits(winrct, 'v', prefsizey) < 0)) {
@@ -1437,7 +1437,7 @@ static void region_rect_recursive(
BLI_rcti_sanitize(winrct);
}
}
- else if (alignment == RGN_ALIGN_VSPLIT || alignment == RGN_ALIGN_HSPLIT) {
+ else if (ELEM(alignment, RGN_ALIGN_VSPLIT, RGN_ALIGN_HSPLIT)) {
/* percentage subdiv*/
region->winrct = *remainder;
@@ -3582,7 +3582,7 @@ static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const
ofs_y += vertical_offset;
}
} /* Strip */
- else if (i == 1 || i == 2) {
+ else if (ELEM(i, 1, 2)) {
int len = BLI_snprintf_rlen(temp_str, MAX_METADATA_STR, "%s: ", meta_data_list[i + 1]);
if (metadata_is_valid(ibuf, temp_str, i + 1, len)) {
BLF_position(fontid, xmin, ymax - vertical_offset - ofs_y, 0.0f);