Cleanup: use C++ comments for disabled code

Also ensure space around text in C-comment blocks.
This commit is contained in:
Campbell Barton 2022-04-13 13:46:22 +10:00
parent 4b5195a9d7
commit 7d3db7a3ae
18 changed files with 25 additions and 23 deletions

View File

@ -40,7 +40,7 @@ size_t count_utf_8_from_16(const wchar_t *string16)
}
else {
if (u < 0xE000) {
/*illegal*/;
/* Illegal. */
}
else {
count += 3;

View File

@ -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);
}

View File

@ -37,7 +37,7 @@ struct BLaplacianSystem {
BMOperator *op;
LinearSolver *context;
/*Data*/
/* Data. */
float min_area;
};
typedef struct BLaplacianSystem LaplacianSystem;

View File

@ -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 */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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 */

View File

@ -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);
}

View File

@ -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. */

View File

@ -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))

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -60,7 +60,7 @@ struct BLaplacianSystem {
const MEdge *medges;
LinearSolver *context;
/*Data*/
/* Data. */
float min_area;
float vert_centroid[3];
};

View File

@ -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]);

View File

@ -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;