diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-24 07:24:54 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:31:44 +0300 |
commit | e586006d5c1fe76add969ac35e4f722e57d395f6 (patch) | |
tree | ea1a80155047a96a5c7581aecd94eaa3464e6aca /source/blender/editors | |
parent | 80157d7060f7cad8bac5d7dad3dda54b2b52a7ea (diff) |
Cleanup: Clang tidy
- Deprecated headers
- Else after return
- Inconsistent parameter names (I used the most recently modified)
- Raw string literals
Diffstat (limited to 'source/blender/editors')
5 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index 16a3e799779..ef0f0b6225c 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -1679,19 +1679,19 @@ class PreviewLoadJob { PreviewLoadJob(); ~PreviewLoadJob(); - static PreviewLoadJob &ensure_job(wmWindowManager *, wmWindow *); - static void load_jobless(PreviewImage *, eIconSizes); + static PreviewLoadJob &ensure_job(wmWindowManager *wm, wmWindow *win); + static void load_jobless(PreviewImage *preview, eIconSizes icon_size); - void push_load_request(PreviewImage *, eIconSizes); + void push_load_request(PreviewImage *preview, eIconSizes icon_size); private: - static void run_fn(void *, short *, short *, float *); - static void update_fn(void *); - static void end_fn(void *); - static void free_fn(void *); + static void run_fn(void *customdata, short *stop, short *do_update, float *progress); + static void update_fn(void *customdata); + static void end_fn(void *customdata); + static void free_fn(void *customdata); /** Mark a single requested preview as being done, remove the request. */ - static void finish_request(RequestedPreview &); + static void finish_request(RequestedPreview &request); }; PreviewLoadJob::PreviewLoadJob() : todo_queue_(BLI_thread_queue_init()) diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_3d_brush.cc b/source/blender/editors/sculpt_paint/curves_sculpt_3d_brush.cc index 51997cd9e1e..945bb09c0c6 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_3d_brush.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_3d_brush.cc @@ -65,7 +65,7 @@ static std::optional<float3> find_curves_brush_position(const CurvesGeometry &cu /* New candidate is in inner radius while old one is not. */ return true; } - else if (b.depth_sq_cu < a.depth_sq_cu) { + if (b.depth_sq_cu < a.depth_sq_cu) { /* Both candidates are in inner radius, but new one is closer to the camera. */ return true; } diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc index 2f39e6eec20..e444b3de2d5 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc @@ -55,7 +55,7 @@ class AddOperation : public CurvesSculptStrokeOperation { friend struct AddOperationExecutor; public: - ~AddOperation() + ~AddOperation() override { if (curve_roots_kdtree_ != nullptr) { BLI_kdtree_3d_free(curve_roots_kdtree_); diff --git a/source/blender/editors/space_outliner/tree/tree_element_rna.cc b/source/blender/editors/space_outliner/tree/tree_element_rna.cc index abc7cd8f8ce..914104f1f06 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_rna.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_rna.cc @@ -52,7 +52,7 @@ bool TreeElementRNACommon::isRNAValid() const return rna_ptr_.data != nullptr; } -bool TreeElementRNACommon::expandPoll(const SpaceOutliner &) const +bool TreeElementRNACommon::expandPoll(const SpaceOutliner &UNUSED(space_outliner)) const { return isRNAValid(); } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 7ace6343985..bf898b9053f 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -567,10 +567,10 @@ static char snap_flag_from_spacetype(TransInfo *t) if (t->spacetype == SPACE_NODE) { return ts->snap_flag_node; } - else if (t->spacetype == SPACE_IMAGE) { + if (t->spacetype == SPACE_IMAGE) { return ts->snap_uv_flag; } - else if (t->spacetype == SPACE_SEQ) { + if (t->spacetype == SPACE_SEQ) { return ts->snap_flag_seq; } return ts->snap_flag; |