From b302f379526c9abc2ec6bb315d910885c7ff84a6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 22 Sep 2024 18:25:34 +1000 Subject: [PATCH] Cleanup: remove/comment unused struct members & variables --- source/blender/blenkernel/intern/lib_query.cc | 4 ++-- source/blender/editors/armature/pose_slide.cc | 2 +- source/blender/editors/sculpt_paint/paint_image_2d.cc | 2 +- source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp | 3 --- source/blender/io/collada/BCAnimationSampler.cpp | 2 -- source/blender/io/collada/DocumentImporter.cpp | 3 +-- source/blender/modifiers/intern/MOD_simpledeform.cc | 1 - 7 files changed, 5 insertions(+), 12 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_query.cc b/source/blender/blenkernel/intern/lib_query.cc index a2304887649..1a1bcce97de 100644 --- a/source/blender/blenkernel/intern/lib_query.cc +++ b/source/blender/blenkernel/intern/lib_query.cc @@ -511,8 +511,8 @@ bool BKE_library_id_can_use_idtype(ID *owner_id, const short id_type_used) struct IDUsersIter { ID *id; - ListBase *lb_array[INDEX_ID_MAX]; - int lb_idx; + // ListBase *lb_array[INDEX_ID_MAX]; /* UNUSED. */ + // int lb_idx; /* UNUSED. */ ID *curr_id; int count_direct, count_indirect; /* Set by callback. */ diff --git a/source/blender/editors/armature/pose_slide.cc b/source/blender/editors/armature/pose_slide.cc index 035ae5e9a44..83c00335dea 100644 --- a/source/blender/editors/armature/pose_slide.cc +++ b/source/blender/editors/armature/pose_slide.cc @@ -149,7 +149,7 @@ struct tPoseSlideOp { /** Sliding Mode. */ ePoseSlide_Modes mode; /** unused for now, but can later get used for storing runtime settings.... */ - short flag; + // short flag; /* Store overlay settings when invoking the operator. Bones will be temporarily hidden. */ int overlay_flag; diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.cc b/source/blender/editors/sculpt_paint/paint_image_2d.cc index 966cc2f1d13..48ed99d2990 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.cc +++ b/source/blender/editors/sculpt_paint/paint_image_2d.cc @@ -70,7 +70,7 @@ struct BrushPainterCache { CurveMaskCache curve_mask_cache; - int image_size[2]; + // int image_size[2]; /* UNUSED. */ }; struct BrushPainter { diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index c1c86ee42bb..2c22c737ec0 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -1295,7 +1295,6 @@ void ViewMapBuilder::computeInitialViewEdges(WingedEdge &we) void ViewMapBuilder::computeCusps(ViewMap *ioViewMap) { - vector newVVertices; vector newVEdges; ViewMap::viewedges_container &vedges = ioViewMap->ViewEdges(); ViewMap::viewedges_container::iterator ve = vedges.begin(), veend = vedges.end(); @@ -2004,8 +2003,6 @@ void ViewMapBuilder::FindOccludee(FEdge *fe, void ViewMapBuilder::FindOccludee( FEdge *fe, Grid *iGrid, real epsilon, Polygon3r **oaPolygon, uint timestamp) { - OccludersSet occluders; - Vec3r A; Vec3r edgeDir; Vec3r origin; diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp index c4f8abb2f37..75df9999ec9 100644 --- a/source/blender/io/collada/BCAnimationSampler.cpp +++ b/source/blender/io/collada/BCAnimationSampler.cpp @@ -176,7 +176,6 @@ void BCAnimationSampler::sample_scene(BCExportSettings &export_settings, bool ke Scene *scene = blender_context.get_scene(); BCFrameSet scene_sample_frames; get_sample_frames(scene_sample_frames, sampling_rate, keyframe_at_end, scene); - BCFrameSet::iterator it; int startframe = scene->r.sfra; int endframe = scene->r.efra; @@ -277,7 +276,6 @@ void BCAnimationSampler::get_animated_from_export_set(std::set &animat */ animated_objects.clear(); - std::set static_objects; std::set candidates; LinkNode *node; diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp index 01ee8379226..2768bb9dbe1 100644 --- a/source/blender/io/collada/DocumentImporter.cpp +++ b/source/blender/io/collada/DocumentImporter.cpp @@ -452,7 +452,6 @@ Object *DocumentImporter::create_instance_node(Object *source_ob, void DocumentImporter::create_constraints(ExtraTags *et, Object *ob) { if (et && et->isProfile("blender")) { - std::string name; short type = 0; et->setData("type", &type); BKE_constraint_add_for_object(ob, "Test_con", type); @@ -1027,7 +1026,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light) et->setData("area_sizez", &(lamp->area_sizez)); } else { - float d = 25.0f; + // float d = 25.0f; /* UNUSED. */ float e = 1.0f; if (light->getColor().isValid()) { diff --git a/source/blender/modifiers/intern/MOD_simpledeform.cc b/source/blender/modifiers/intern/MOD_simpledeform.cc index 9559b3771ad..4a6d2026b4f 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.cc +++ b/source/blender/modifiers/intern/MOD_simpledeform.cc @@ -38,7 +38,6 @@ BLI_ALIGN_STRUCT struct DeformUserData { int lock_axis; int vgroup; int limit_axis; - float weight; float smd_factor; float smd_limit[2]; float (*vertexCos)[3];