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 18:30:31 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 18:42:46 +0300
commit33a74941c5fd4efb6eefcaace3315d3e2b65681f (patch)
tree2d3da68b73e4419750c7f767bbb78bf1a303ad18 /source/blender/editors/space_info
parent367034f210137754ab4f07a0e7793066d2b69e59 (diff)
Cleanup: Editors, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors` module. No functional changes.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_draw.c25
-rw-r--r--source/blender/editors/space_info/textview.c2
2 files changed, 11 insertions, 16 deletions
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index 3685e5de852..6c818257ec7 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -108,9 +108,8 @@ static enum eTextViewContext_LineFlag report_line_data(TextViewContext *tvc,
UI_GetThemeColor4ubv(icon_bg_id, r_icon_bg);
return TVC_LINE_FG | TVC_LINE_BG | TVC_LINE_ICON | TVC_LINE_ICON_FG | TVC_LINE_ICON_BG;
}
- else {
- return TVC_LINE_FG | TVC_LINE_BG;
- }
+
+ return TVC_LINE_FG | TVC_LINE_BG;
}
/* reports! */
@@ -159,9 +158,8 @@ static int report_textview_begin(TextViewContext *tvc)
return true;
}
- else {
- return false;
- }
+
+ return false;
}
static void report_textview_end(TextViewContext *UNUSED(tvc))
@@ -185,17 +183,14 @@ static int report_textview_step(TextViewContext *tvc)
return true;
}
- else {
- return false;
- }
+ return false;
}
- else {
- /* step to the next newline */
- tvc->iter_char_end = tvc->iter_char_begin - 1;
- report_textview_init__internal(tvc);
- return true;
- }
+ /* step to the next newline */
+ tvc->iter_char_end = tvc->iter_char_begin - 1;
+ report_textview_init__internal(tvc);
+
+ return true;
}
static void report_textview_line_get(TextViewContext *tvc, const char **r_line, int *r_len)
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 8076d3d7eaf..eee8b989cc2 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -186,7 +186,7 @@ static bool textview_draw_string(TextViewDrawState *tds,
MEM_freeN(offsets);
return true;
}
- else if (y_next < tds->scroll_ymin) {
+ if (y_next < tds->scroll_ymin) {
/* Have not reached the drawable area so don't break. */
tds->xy[1] = y_next;