From e9c50913f83373e7679b2877a86c043e3bd89cd1 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 3 Mar 2021 12:17:16 +0100 Subject: Cleanup: clang tidy Warning: else-after-return/break --- .../blender/editors/sculpt_paint/sculpt_expand.c | 28 ++++++++++------------ .../editors/space_sequencer/sequencer_add.c | 4 +--- 2 files changed, 13 insertions(+), 19 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c index 53f2821eb76..2d1d973221a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_expand.c +++ b/source/blender/editors/sculpt_paint/sculpt_expand.c @@ -1471,9 +1471,7 @@ static int sculpt_expand_target_vertex_update_and_get(bContext *C, if (SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false)) { return SCULPT_active_vertex_get(ss); } - else { - return SCULPT_EXPAND_VERTEX_NONE; - } + return SCULPT_EXPAND_VERTEX_NONE; } /** @@ -1768,20 +1766,18 @@ static int sculpt_expand_modal(bContext *C, wmOperator *op, const wmEvent *event expand_cache->move_original_falloff_type); break; } + expand_cache->move = true; + expand_cache->move_original_falloff_type = expand_cache->falloff_type; + copy_v2_v2(expand_cache->initial_mouse_move, mouse); + copy_v2_v2(expand_cache->original_mouse_move, expand_cache->initial_mouse); + if (expand_cache->falloff_type == SCULPT_EXPAND_FALLOFF_GEODESIC && + SCULPT_vertex_count_get(ss) > expand_cache->max_geodesic_move_preview) { + /* Set to spherical falloff for preview in high poly meshes as it is the fastest one. + * In most cases it should match closely the preview from geodesic. */ + expand_cache->move_preview_falloff_type = SCULPT_EXPAND_FALLOFF_SPHERICAL; + } else { - expand_cache->move = true; - expand_cache->move_original_falloff_type = expand_cache->falloff_type; - copy_v2_v2(expand_cache->initial_mouse_move, mouse); - copy_v2_v2(expand_cache->original_mouse_move, expand_cache->initial_mouse); - if (expand_cache->falloff_type == SCULPT_EXPAND_FALLOFF_GEODESIC && - SCULPT_vertex_count_get(ss) > expand_cache->max_geodesic_move_preview) { - /* Set to spherical falloff for preview in high poly meshes as it is the fastest one. - * In most cases it should match closely the preview from geodesic. */ - expand_cache->move_preview_falloff_type = SCULPT_EXPAND_FALLOFF_SPHERICAL; - } - else { - expand_cache->move_preview_falloff_type = expand_cache->falloff_type; - } + expand_cache->move_preview_falloff_type = expand_cache->falloff_type; } break; } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 037ce78b9a2..844dbe6a0a5 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -924,9 +924,7 @@ static int sequencer_add_image_strip_calculate_length(wmOperator *op, if (use_placeholders) { return sequencer_image_seq_get_minmax_frame(op, start_frame, minframe, numdigits); } - else { - return RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); - } + return RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); } static void sequencer_add_image_strip_load_files( -- cgit v1.2.3