diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 12:23:02 +0300 |
commit | a29686eeb3af051a00fbb8a8b9be06bcd050ec8c (patch) | |
tree | 9da60e7257e3e2dafda3e9b565b77c9c6f37675b /source/blender/windowmanager/intern/wm_files.c | |
parent | e0c51b466f3b23a1fc114690be2b008e19637ea6 (diff) |
Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index f39fc0aecf2..ef4f2b4a62a 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1404,10 +1404,8 @@ bool write_crash_blend(void) printf("written: %s\n", path); return 1; } - else { - printf("failed: %s\n", path); - return 0; - } + printf("failed: %s\n", path); + return 0; } /** @@ -2091,9 +2089,7 @@ static int wm_homefile_read_invoke(bContext *C, wmOperator *op, const wmEvent *U wm_close_file_dialog(C, callback); return OPERATOR_INTERFACE; } - else { - return wm_homefile_read_exec(C, op); - } + return wm_homefile_read_exec(C, op); } static void read_homefile_props(wmOperatorType *ot) @@ -2255,9 +2251,7 @@ static int wm_open_mainfile__discard_changes(bContext *C, wmOperator *op) wm_close_file_dialog(C, callback); return OPERATOR_INTERFACE; } - else { - return wm_open_mainfile_dispatch(C, op); - } + return wm_open_mainfile_dispatch(C, op); } static int wm_open_mainfile__select_file_path(bContext *C, wmOperator *op) @@ -2328,9 +2322,7 @@ static int wm_open_mainfile__open(bContext *C, wmOperator *op) ED_view3d_local_collections_reset(C, (G.fileflags & G_FILE_NO_UI) != 0); return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } static OperatorDispatchTarget wm_open_mainfile_dispatch_targets[] = { @@ -2475,9 +2467,7 @@ static int wm_revert_mainfile_exec(bContext *C, wmOperator *op) if (success) { return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } static bool wm_revert_mainfile_poll(bContext *UNUSED(C)) @@ -2572,9 +2562,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op) if (success) { return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) |