From 7d3db7a3ae9f3b3039e81138e3d399f1d4f9717f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Apr 2022 13:46:22 +1000 Subject: [PATCH] Cleanup: use C++ comments for disabled code Also ensure space around text in C-comment blocks. --- intern/utfconv/utfconv.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/bmesh/operators/bmo_smooth_laplacian.c | 2 +- .../blender/compositor/intern/COM_NodeOperationBuilder.cc | 2 +- source/blender/editors/object/object_select.c | 2 +- source/blender/editors/sculpt_paint/sculpt_intern.h | 2 +- source/blender/editors/sculpt_paint/sculpt_undo.c | 2 +- .../blender/editors/transform/transform_convert_sequencer.c | 6 ++++-- source/blender/editors/util/ed_transverts.c | 2 +- source/blender/makesrna/intern/rna_ID.c | 2 +- source/blender/makesrna/intern/rna_armature.c | 2 +- source/blender/makesrna/intern/rna_brush.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/makesrna/intern/rna_object.c | 6 +++--- source/blender/makesrna/intern/rna_texture.c | 2 +- source/blender/modifiers/intern/MOD_laplaciansmooth.c | 2 +- source/blender/modifiers/intern/MOD_screw.c | 4 ++-- source/blender/python/bmesh/bmesh_py_types.c | 4 ++-- 18 files changed, 25 insertions(+), 23 deletions(-) diff --git a/intern/utfconv/utfconv.c b/intern/utfconv/utfconv.c index a9625309a55..4cc72ae110f 100644 --- a/intern/utfconv/utfconv.c +++ b/intern/utfconv/utfconv.c @@ -40,7 +40,7 @@ size_t count_utf_8_from_16(const wchar_t *string16) } else { if (u < 0xE000) { - /*illegal*/; + /* Illegal. */ } else { count += 3; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index aba0bfe84d2..27890a908ab 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2619,7 +2619,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, scpt->script = restore_pointer_by_name(id_map, (ID *)scpt->script, USER_REAL); - /*screen->script = NULL; - 2.45 set to null, better re-run the script */ + // screen->script = NULL; /* 2.45 set to null, better re-run the script. */ if (scpt->script) { SCRIPT_SET_NULL(scpt->script); } diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 67ab57fa403..08efe5383a8 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -37,7 +37,7 @@ struct BLaplacianSystem { BMOperator *op; LinearSolver *context; - /*Data*/ + /* Data. */ float min_area; }; typedef struct BLaplacianSystem LaplacianSystem; diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc index 788686f3036..1fdec43eb3b 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc @@ -104,7 +104,7 @@ void NodeOperationBuilder::convert_to_operations(ExecutionSystem *system) prune_operations(); /* ensure topological (link-based) order of nodes */ - /*sort_operations();*/ /* not needed yet */ + // sort_operations(); /* not needed yet. */ if (context_->get_execution_model() == eExecutionModel::Tiled) { /* create execution groups */ diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 3ebf578ca6b..c3d8fb9cfe5 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -1449,7 +1449,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot) ot->idname = "OBJECT_OT_select_random"; /* api callbacks */ - /*ot->invoke = object_select_random_invoke XXX: need a number popup ;*/ + // ot->invoke = object_select_random_invoke; /* TODO: need a number popup. */ ot->exec = object_select_random_exec; ot->poll = objects_selectable_poll; diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 03d459b6af7..466432a35ec 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -440,7 +440,7 @@ typedef struct FilterCache { /* Auto-masking. */ AutomaskingCache *automasking; - /* Pre-smoothed colors used by sharpening. Colors are HSL.*/ + /* Pre-smoothed colors used by sharpening. Colors are HSL. */ float (*pre_smoothed_color)[4]; } FilterCache; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 1354277fbdd..eae90359dfd 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -343,7 +343,7 @@ static bool sculpt_undo_restore_color(bContext *C, SculptUndoNode *unode) bool modified = false; /* NOTE: even with loop colors we still store derived - * vertex colors for original data lookup.*/ + * vertex colors for original data lookup. */ if (unode->col && !unode->loop_col) { BKE_pbvh_swap_colors(ss->pbvh, unode->index, unode->totvert, unode->col); modified = true; diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index c7f086e7d4b..d7d85646b08 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -669,8 +669,10 @@ static Sequence *effect_base_input_get(Sequence *effect, SeqInputSide side) return input; } -/* Strips that aren't selected, but their position entirely depends on transformed strips. - * This collection is used to offset animation.*/ +/** + * Strips that aren't selected, but their position entirely depends on transformed strips. + * This collection is used to offset animation. + */ static SeqCollection *query_time_dependent_strips_strips(TransInfo *t) { ListBase *seqbase = seqbase_active_get(t); diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index 8d8f7733877..ef57f9e9b33 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -203,7 +203,7 @@ void ED_transverts_create_from_obedit(TransVertStore *tvs, const Object *obedit, BMesh *bm = em->bm; BMIter iter; void *userdata[2] = {em, NULL}; - /*int proptrans = 0; */ /*UNUSED*/ + // int proptrans = 0; /*UNUSED*/ /* abuses vertex index all over, set, just set dirty here, * perhaps this could use its own array instead? - campbell */ diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index d3b7e380afa..e2ce1f23a33 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -1457,7 +1457,7 @@ static void rna_def_ID_properties(BlenderRNA *brna) * when we only really want this so RNA_def_struct_name_property() is set to something useful */ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_flag(prop, PROP_IDPROPERTY); - /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ + // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting"); RNA_def_struct_name_property(srna, prop); } diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 11c4dad15e9..8d022338d7a 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -1383,7 +1383,7 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_pointer_sdna(prop, NULL, "act_edbone"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone"); - /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */ + // RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL); /* TODO: redraw. */ diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 062c827b9d0..1b530780261 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -664,7 +664,7 @@ static void rna_Brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR { Brush *br = (Brush *)ptr->data; WM_main_add_notifier(NC_BRUSH | NA_EDITED, br); - /*WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); */ + // WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL); } static void rna_Brush_material_update(bContext *UNUSED(C), PointerRNA *UNUSED(ptr)) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 54031f5a416..16045e6cddf 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -5825,7 +5825,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna) prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "cachepath"); RNA_def_property_ui_text(prop, "Cache Path", "Path to a folder to store external baked images"); - /*RNA_def_property_update(prop, 0, "rna_Modifier_update"); */ + // RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* XXX how to update? */ RNA_define_lib_overridable(false); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 358f88c8f4d..1fb41bf792f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2572,11 +2572,11 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_pointer_sdna(prop, NULL, "act_edbone"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone"); - /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */ + // RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL); /* TODO: redraw. */ -/* RNA_def_property_collection_active(prop, prop_act); */ + // RNA_def_property_collection_active(prop, prop_act); # endif /* add modifier */ @@ -3387,7 +3387,7 @@ static void rna_def_object(BlenderRNA *brna) prop, "rna_Object_matrix_basis_get", "rna_Object_matrix_basis_set", NULL); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - /*parent_inverse*/ + /* Parent_inverse. */ prop = RNA_def_property(srna, "matrix_parent_inverse", PROP_FLOAT, PROP_MATRIX); RNA_def_property_float_sdna(prop, NULL, "parentinv"); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 56d1b48811a..6f7ee966723 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -1556,7 +1556,7 @@ static void rna_def_texture(BlenderRNA *brna) RNA_def_struct_refine_func(srna, "rna_Texture_refine"); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */ + // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, rna_enum_texture_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL); diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 11abe9a4d0a..95283b1cd20 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -60,7 +60,7 @@ struct BLaplacianSystem { const MEdge *medges; LinearSolver *context; - /*Data*/ + /* Data. */ float min_area; float vert_centroid[3]; }; diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index e8fb667c572..4ace6404388 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -515,7 +515,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * mv_new = mvert_new; if (ob_axis != NULL) { - /*mtx_tx is initialized early on */ + /* `mtx_tx` is initialized early on. */ for (i = 0; i < totvert; i++, mv_new++, mv_orig++, vc++) { vc->co[0] = mv_new->co[0] = mv_orig->co[0]; vc->co[1] = mv_new->co[1] = mv_orig->co[1]; @@ -883,7 +883,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * copy_v3_v3(mv_new->co, mv_new_base->co); /* only need to set these if using non cleared memory */ - /*mv_new->mat_nr = mv_new->flag = 0;*/ + // mv_new->mat_nr = mv_new->flag = 0; if (ob_axis != NULL) { sub_v3_v3(mv_new->co, mtx_tx[3]); diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 1d9fc32f55b..baa2b0deb71 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -3635,8 +3635,8 @@ void BPy_BM_init_types(void) BPy_BMLoopSeq_Type.tp_methods = bpy_bmloopseq_methods; BPy_BMIter_Type.tp_methods = NULL; - /*BPy_BMElem_Check() uses bpy_bm_elem_hash() to check types. - * if this changes update the macro */ + /* #BPy_BMElem_Check() uses #bpy_bm_elem_hash() to check types. + * if this changes update the macro. */ BPy_BMesh_Type.tp_hash = bpy_bm_hash; BPy_BMVert_Type.tp_hash = bpy_bm_elem_hash; BPy_BMEdge_Type.tp_hash = bpy_bm_elem_hash;