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 15:38:26 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 15:48:38 +0300
commit9dce2c9d1432d2798854b909e6262fbfb94ce3c7 (patch)
tree863025e2198da67fab539b16c107b9569a1fb14c /source/blender/editors/gpencil/gpencil_data.c
parent20869065b86263f72e469df17354bd6631be3712 (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_data.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 44b866d81d7..96b0296a7de 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -176,13 +176,11 @@ static int gpencil_data_unlink_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "Nowhere for grease pencil data to go");
return OPERATOR_CANCELLED;
}
- else {
- /* just unlink datablock now, decreasing its user count */
- bGPdata *gpd = (*gpd_ptr);
+ /* just unlink datablock now, decreasing its user count */
+ bGPdata *gpd = (*gpd_ptr);
- id_us_min(&gpd->id);
- *gpd_ptr = NULL;
- }
+ id_us_min(&gpd->id);
+ *gpd_ptr = NULL;
/* notifiers */
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
@@ -1125,9 +1123,7 @@ static int gpencil_isolate_layer_exec(bContext *C, wmOperator *op)
if (gpl == layer) {
continue;
}
- else {
- gpl->flag |= flags;
- }
+ gpl->flag |= flags;
}
}
else {
@@ -2913,9 +2909,7 @@ static int gpencil_material_isolate_exec(bContext *C, wmOperator *op)
if (gp_style == active_color) {
continue;
}
- else {
- gp_style->flag |= flags;
- }
+ gp_style->flag |= flags;
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
}
}