diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 15:38:26 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 15:48:38 +0300 |
commit | 9dce2c9d1432d2798854b909e6262fbfb94ce3c7 (patch) | |
tree | 863025e2198da67fab539b16c107b9569a1fb14c /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 20869065b86263f72e469df17354bd6631be3712 (diff) |
Cleanup: Editors/GPencil, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/gpencil` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 78e2812fdef..f8010edfcdd 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1490,13 +1490,15 @@ static int gpencil_strokes_paste_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Operator not supported in multiframe edition"); return OPERATOR_CANCELLED; } - else if (BLI_listbase_is_empty(&gpencil_strokes_copypastebuf)) { + + if (BLI_listbase_is_empty(&gpencil_strokes_copypastebuf)) { BKE_report(op->reports, RPT_ERROR, "No strokes to paste, select and copy some points before trying again"); return OPERATOR_CANCELLED; } - else if (gpl == NULL) { + + if (gpl == NULL) { /* no active layer - let's just create one */ gpl = BKE_gpencil_layer_addnew(gpd, DATA_("GP_Layer"), true); } @@ -1955,10 +1957,8 @@ static int gpencil_actframe_delete_all_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); return OPERATOR_FINISHED; } - else { - BKE_report(op->reports, RPT_ERROR, "No active frame(s) to delete"); - return OPERATOR_CANCELLED; - } + BKE_report(op->reports, RPT_ERROR, "No active frame(s) to delete"); + return OPERATOR_CANCELLED; } void GPENCIL_OT_active_frames_delete_all(wmOperatorType *ot) @@ -2050,9 +2050,7 @@ static int gpencil_delete_selected_strokes(bContext *C) WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } /* ----------------------------------- */ @@ -2268,9 +2266,7 @@ static int gpencil_dissolve_selected_points(bContext *C, eGP_DissolveMode mode) WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } /* ----------------------------------- */ @@ -2583,9 +2579,7 @@ static int gpencil_delete_selected_points(bContext *C) WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } /* simple wrapper to external call */ |