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:
authorHans Goudey <h.goudey@me.com>2022-06-23 02:58:25 +0300
committerHans Goudey <h.goudey@me.com>2022-06-23 02:58:25 +0300
commit1160a3a3f83cafda98e7bf6fb111bdacc5f28a63 (patch)
treeb969f2508aac0cb59cd3fe81119dc1301a84bfb0 /source/blender/editors
parentd2a3b99ff7abb3d7deb30da4554b1cda6ff32766 (diff)
Cleanup: Clang tidy
Mainly duplicate includes and else after return.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_brush.cc2
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c31
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element_overrides.cc4
-rw-r--r--source/blender/editors/uvedit/uvedit_select.c2
5 files changed, 18 insertions, 23 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
index 8c6ef34ef26..1c785fa6452 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
@@ -9,8 +9,6 @@
#include "BKE_context.h"
#include "BKE_curves.hh"
-#include "DNA_meshdata_types.h"
-
#include "ED_view3d.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 0f2b02ed3ab..ce6b397af15 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -90,13 +90,13 @@ static eGPBrush_Presets gpencil_get_brush_preset_from_tool(bToolRef *tool,
if (STREQ(tool->runtime->data_block, "DRAW")) {
return GP_BRUSH_PRESET_PENCIL;
}
- else if (STREQ(tool->runtime->data_block, "FILL")) {
+ if (STREQ(tool->runtime->data_block, "FILL")) {
return GP_BRUSH_PRESET_FILL_AREA;
}
- else if (STREQ(tool->runtime->data_block, "ERASE")) {
+ if (STREQ(tool->runtime->data_block, "ERASE")) {
return GP_BRUSH_PRESET_ERASER_SOFT;
}
- else if (STREQ(tool->runtime->data_block, "TINT")) {
+ if (STREQ(tool->runtime->data_block, "TINT")) {
return GP_BRUSH_PRESET_TINT;
}
break;
@@ -105,28 +105,28 @@ static eGPBrush_Presets gpencil_get_brush_preset_from_tool(bToolRef *tool,
if (STREQ(tool->runtime->data_block, "SMOOTH")) {
return GP_BRUSH_PRESET_SMOOTH_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "STRENGTH")) {
+ if (STREQ(tool->runtime->data_block, "STRENGTH")) {
return GP_BRUSH_PRESET_STRENGTH_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "THICKNESS")) {
+ if (STREQ(tool->runtime->data_block, "THICKNESS")) {
return GP_BRUSH_PRESET_THICKNESS_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "GRAB")) {
+ if (STREQ(tool->runtime->data_block, "GRAB")) {
return GP_BRUSH_PRESET_GRAB_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "PUSH")) {
+ if (STREQ(tool->runtime->data_block, "PUSH")) {
return GP_BRUSH_PRESET_PUSH_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "TWIST")) {
+ if (STREQ(tool->runtime->data_block, "TWIST")) {
return GP_BRUSH_PRESET_TWIST_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "PINCH")) {
+ if (STREQ(tool->runtime->data_block, "PINCH")) {
return GP_BRUSH_PRESET_PINCH_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "RANDOMIZE")) {
+ if (STREQ(tool->runtime->data_block, "RANDOMIZE")) {
return GP_BRUSH_PRESET_RANDOMIZE_STROKE;
}
- else if (STREQ(tool->runtime->data_block, "CLONE")) {
+ if (STREQ(tool->runtime->data_block, "CLONE")) {
return GP_BRUSH_PRESET_CLONE_STROKE;
}
break;
@@ -138,23 +138,22 @@ static eGPBrush_Presets gpencil_get_brush_preset_from_tool(bToolRef *tool,
if (STREQ(tool->runtime->data_block, "DRAW")) {
return GP_BRUSH_PRESET_VERTEX_DRAW;
}
- else if (STREQ(tool->runtime->data_block, "BLUR")) {
+ if (STREQ(tool->runtime->data_block, "BLUR")) {
return GP_BRUSH_PRESET_VERTEX_BLUR;
}
- else if (STREQ(tool->runtime->data_block, "AVERAGE")) {
+ if (STREQ(tool->runtime->data_block, "AVERAGE")) {
return GP_BRUSH_PRESET_VERTEX_AVERAGE;
}
- else if (STREQ(tool->runtime->data_block, "SMEAR")) {
+ if (STREQ(tool->runtime->data_block, "SMEAR")) {
return GP_BRUSH_PRESET_VERTEX_SMEAR;
}
- else if (STREQ(tool->runtime->data_block, "REPLACE")) {
+ if (STREQ(tool->runtime->data_block, "REPLACE")) {
return GP_BRUSH_PRESET_VERTEX_REPLACE;
}
break;
}
default:
return GP_BRUSH_PRESET_UNKNOWN;
- break;
}
return GP_BRUSH_PRESET_UNKNOWN;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 0693b445fe5..fe96257dc01 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -858,7 +858,7 @@ void SCULPT_geometry_preview_lines_update(bContext *C, struct SculptSession *ss,
void SCULPT_stroke_modifiers_check(const bContext *C, Object *ob, const Brush *brush);
float SCULPT_raycast_init(struct ViewContext *vc,
- const float mouse[2],
+ const float mval[2],
float ray_start[3],
float ray_end[3],
float ray_normal[3],
diff --git a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
index 871de39b1dd..d1babda642e 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
+++ b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
@@ -86,9 +86,7 @@ void TreeElementOverridesBase::expand(SpaceOutliner &space_outliner) const
do_skip = false;
break;
}
- else {
- is_system_override = true;
- }
+ is_system_override = true;
}
}
diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c
index 8dcf2ceb679..964ac5f650b 100644
--- a/source/blender/editors/uvedit/uvedit_select.c
+++ b/source/blender/editors/uvedit/uvedit_select.c
@@ -4914,7 +4914,7 @@ static int uv_select_similar_exec(bContext *C, wmOperator *op)
if (selectmode & UV_SELECT_EDGE) {
return uv_select_similar_edge_exec(C, op);
}
- else if (selectmode & UV_SELECT_FACE) {
+ if (selectmode & UV_SELECT_FACE) {
return uv_select_similar_face_exec(C, op);
}
if (selectmode & UV_SELECT_ISLAND) {