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-03-08 22:28:22 +0300
committerHans Goudey <h.goudey@me.com>2022-03-08 22:28:22 +0300
commitd09695b4dd0eca917004177d30df9e09d9f8732d (patch)
treeb1a15aa2934ca8398644d7d6896247d565c7fb47
parent90c3147e05b31000ad6ca2f9db1d1b0907c7acd6 (diff)
Cleanup: Clang tidy
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc2
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc6
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c13
-rw-r--r--source/blender/editors/uvedit/uvedit_select.c2
6 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index b8c85430f06..9551a00cf95 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -483,7 +483,7 @@ void deg_graph_node_tag_zero(Main *bmain,
if (comp_node->type == NodeType::ANIMATION) {
continue;
}
- else if (comp_node->type == NodeType::COPY_ON_WRITE) {
+ if (comp_node->type == NodeType::COPY_ON_WRITE) {
id_node->is_cow_explicitly_tagged = true;
}
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index b1635ce6e09..19022d534b2 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -739,7 +739,7 @@ void update_id_after_copy(const Depsgraph *depsgraph,
case ID_GD: {
bGPdata *gpd_cow = (bGPdata *)id_cow;
bGPDlayer *gpl = (bGPDlayer *)(gpd_cow->layers.first);
- if (gpl != NULL && gpl->runtime.gpl_orig == NULL) {
+ if (gpl != nullptr && gpl->runtime.gpl_orig == nullptr) {
BKE_gpencil_data_update_orig_pointers((bGPdata *)id_orig, gpd_cow);
}
break;
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 4bf81b72c3c..4dee7641623 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -518,7 +518,7 @@ class AddOperation : public CurvesSculptStrokeOperation {
};
public:
- ~AddOperation()
+ ~AddOperation() override
{
if (old_kdtree_ != nullptr) {
BLI_kdtree_3d_free(old_kdtree_);
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 53de7d582b6..04d4da5e62f 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -2348,10 +2348,8 @@ static BIFIconID tree_element_get_icon_from_id(const ID *id)
if (text->filepath == nullptr || (text->flags & TXT_ISMEM)) {
return ICON_FILE_TEXT;
}
- else {
- /* Helps distinguish text-based formats like the file-browser does. */
- return (BIFIconID)ED_file_extension_icon(text->filepath);
- }
+ /* Helps distinguish text-based formats like the file-browser does. */
+ return (BIFIconID)ED_file_extension_icon(text->filepath);
}
case ID_GR:
return ICON_OUTLINER_COLLECTION;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index bbf84ee74d7..fe6f9f0d513 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1518,11 +1518,11 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
BM_face_select_set(em->bm, efa, false);
break;
}
- else if (UV_VERT_SEL_TEST(luv, !swap) && (ts->uv_selectmode == UV_SELECT_VERTEX)) {
+ if (UV_VERT_SEL_TEST(luv, !swap) && (ts->uv_selectmode == UV_SELECT_VERTEX)) {
BM_face_select_set(em->bm, efa, false);
break;
}
- else if (ts->uv_selectmode == UV_SELECT_ISLAND) {
+ if (ts->uv_selectmode == UV_SELECT_ISLAND) {
BM_face_select_set(em->bm, efa, false);
break;
}
@@ -1533,18 +1533,21 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
if (UV_EDGE_SEL_TEST(luv, !swap) && (ts->uv_selectmode == UV_SELECT_EDGE)) {
- if (em->selectmode == SCE_SELECT_EDGE)
+ if (em->selectmode == SCE_SELECT_EDGE) {
BM_edge_select_set(em->bm, l->e, false);
+ }
else {
BM_vert_select_set(em->bm, l->v, false);
BM_vert_select_set(em->bm, l->next->v, false);
}
}
else if (UV_VERT_SEL_TEST(luv, !swap) && (ts->uv_selectmode != UV_SELECT_EDGE)) {
- if (em->selectmode == SCE_SELECT_EDGE)
+ if (em->selectmode == SCE_SELECT_EDGE) {
BM_edge_select_set(em->bm, l->e, false);
- else
+ }
+ else {
BM_vert_select_set(em->bm, l->v, false);
+ }
}
}
if (!swap) {
diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c
index 2728c29141a..3bba618f682 100644
--- a/source/blender/editors/uvedit/uvedit_select.c
+++ b/source/blender/editors/uvedit/uvedit_select.c
@@ -1720,7 +1720,7 @@ static int uv_select_edgering(Scene *scene, Object *obedit, UvNearestHit *hit, c
if (select && uvedit_edge_select_test(scene, l_step, cd_loop_uv_offset)) {
break;
}
- else if (!select && !uvedit_edge_select_test(scene, l_step, cd_loop_uv_offset)) {
+ if (!select && !uvedit_edge_select_test(scene, l_step, cd_loop_uv_offset)) {
break;
}
}