[Bf-blender-cvs] [049c34b86ee] ui-asset-view-template: Cleanup: clang tidy

Jacques Lucke noreply at git.blender.org
Wed Mar 3 21:45:19 CET 2021


Commit: 049c34b86ee9e7b08275e29cca914fc9884b4ad4
Author: Jacques Lucke
Date:   Wed Mar 3 12:17:16 2021 +0100
Branches: ui-asset-view-template
https://developer.blender.org/rB049c34b86ee9e7b08275e29cca914fc9884b4ad4

Cleanup: clang tidy

Warning: else-after-return/break

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_expand.c
M	source/blender/editors/space_sequencer/sequencer_add.c

===================================================================

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(



More information about the Bf-blender-cvs mailing list