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:
authorSybren A. Stüvel <sybren@blender.org>2020-07-03 17:01:15 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 17:15:01 +0300
commitfd5b093f84845ab7adbe7e6e4dec4bbadbbc16af (patch)
tree80e57d3d29d38afc67e89c7c6014687f5a749c63 /source/blender/editors/screen/area.c
parent4283da83cc9e307e6e5ce03916bb08a2adb02eba (diff)
Cleanup: Editors/Screen, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/screen` module. No functional changes.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index a182dd662af..3415e21c9e0 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -531,7 +531,7 @@ void ED_region_do_draw(bContext *C, ARegion *region)
return;
}
/* optional header info instead? */
- else if (region->headerstr) {
+ if (region->headerstr) {
region_draw_status_text(area, region);
}
else if (at->draw) {
@@ -1128,9 +1128,8 @@ static int rct_fits(const rcti *rect, char dir, int size)
if (dir == 'h') {
return BLI_rcti_size_x(rect) + 1 - size;
}
- else { /* 'v' */
- return BLI_rcti_size_y(rect) + 1 - size;
- }
+ /* 'v' */
+ return BLI_rcti_size_y(rect) + 1 - size;
}
/* *************************************************************** */
@@ -1176,18 +1175,14 @@ static void region_overlap_fix(ScrArea *area, ARegion *region)
region->flag |= RGN_FLAG_TOO_SMALL;
return;
}
- else {
- BLI_rcti_translate(&region->winrct, ar1->winx, 0);
- }
+ BLI_rcti_translate(&region->winrct, ar1->winx, 0);
}
else if (align1 == RGN_ALIGN_RIGHT) {
if (region->winrct.xmin - ar1->winx < U.widget_unit) {
region->flag |= RGN_FLAG_TOO_SMALL;
return;
}
- else {
- BLI_rcti_translate(&region->winrct, -ar1->winx, 0);
- }
+ BLI_rcti_translate(&region->winrct, -ar1->winx, 0);
}
}
@@ -3014,7 +3009,7 @@ ScrArea *ED_screen_areas_iter_first(const wmWindow *win, const bScreen *screen)
if (!global_area) {
return screen->areabase.first;
}
- else if ((global_area->global->flag & GLOBAL_AREA_IS_HIDDEN) == 0) {
+ if ((global_area->global->flag & GLOBAL_AREA_IS_HIDDEN) == 0) {
return global_area;
}
/* Find next visible area. */