From 33a74941c5fd4efb6eefcaace3315d3e2b65681f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 3 Jul 2020 17:30:31 +0200 Subject: 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. --- source/blender/editors/io/io_collada.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'source/blender/editors/io') diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index c1a4492994a..94636848d91 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -253,16 +253,15 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "No objects selected -- Created empty export file"); return OPERATOR_CANCELLED; } - else if (export_count < 0) { + if (export_count < 0) { BKE_report(op->reports, RPT_WARNING, "Error during export (see Console)"); return OPERATOR_CANCELLED; } - else { - char buff[100]; - sprintf(buff, "Exported %d Objects", export_count); - BKE_report(op->reports, RPT_INFO, buff); - return OPERATOR_FINISHED; - } + + char buff[100]; + sprintf(buff, "Exported %d Objects", export_count); + BKE_report(op->reports, RPT_INFO, buff); + return OPERATOR_FINISHED; } static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) @@ -803,10 +802,9 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS); return OPERATOR_FINISHED; } - else { - BKE_report(op->reports, RPT_ERROR, "Parsing errors in Document (see Blender Console)"); - return OPERATOR_CANCELLED; - } + + BKE_report(op->reports, RPT_ERROR, "Parsing errors in Document (see Blender Console)"); + return OPERATOR_CANCELLED; } static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr) -- cgit v1.2.3