Cleanup: spelling in comments, use C++ comments for disabled code

This commit is contained in:
Campbell Barton 2022-03-08 13:48:31 +11:00
parent 901a03725e
commit 7b66397664
15 changed files with 26 additions and 24 deletions

View File

@ -286,8 +286,8 @@ void BLO_expand_id(BlendExpander *expander, struct ID *id);
* This function ensures that reports are printed,
* in the case of library linking errors this is important!
*
* bit kludge but better than doubling up on prints,
* we could alternatively have a versions of a report function which forces printing - campbell
* NOTE(@campbellbarton) a kludge but better than doubling up on prints,
* we could alternatively have a versions of a report function which forces printing.
*/
void BLO_reportf_wrap(struct BlendFileReadReport *reports,
eReportType type,

View File

@ -161,7 +161,7 @@
* which keeps large arrays in memory from data-blocks we may not even use.
*
* \note This is disabled when using compression,
* while zlib supports seek it's unusably slow, see: T61880.
* while zlib supports seek it's unusable slow, see: T61880.
*/
#define USE_BHEAD_READ_ON_DEMAND
@ -4711,9 +4711,9 @@ static void read_library_linked_ids(FileData *basefd,
read_library_linked_id(basefd, fd, mainvar, id, realid);
}
/* realid shall never be NULL - unless some source file/lib is broken
/* `realid` shall never be NULL - unless some source file/lib is broken
* (known case: some directly linked shapekey from a missing lib...). */
/* BLI_assert(*realid != NULL); */
// BLI_assert(*realid != NULL);
/* Now that we have a real ID, replace all pointers to placeholders in
* fd->libmap with pointers to the real data-blocks. We do this for all

View File

@ -1075,11 +1075,10 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
}
/* ton: made this 230 instead of 229,
* to be sure (tuho files) and this is a reliable check anyway
/* NOTE(@ton): made this 230 instead of 229,
* to be sure (files from the `tuhopuu` branch) and this is a reliable check anyway
* nevertheless, we might need to think over a fitness (initialize)
* check apart from the do_versions()
*/
* check apart from the do_versions(). */
if (bmain->versionfile <= 230) {
bScreen *screen;

View File

@ -5571,7 +5571,7 @@ static void bevel_build_cutoff(BevelParams *bp, BMesh *bm, BevVert *bv)
/* Add verts from each cutoff face. */
face_bmverts[i] = mesh_vert(bv->vmesh, i, 1, 0)->v;
}
/* BLI_array_append(bmfaces, repface); */
// BLI_array_append(bmfaces, repface);
bev_create_ngon(bm, face_bmverts, n_bndv, bmfaces, NULL, bmedges, bp->mat_nr, true);
BLI_array_free(bmedges);

View File

@ -811,7 +811,7 @@ static void add_bezt_to_keyblocks_list(AnimKeylist *keylist, BezTriple *bezt, co
* may change order and then this assertion no longer holds. The effect is that the drawing
* isn't perfect during the transform; the "constant value" bars aren't updated until the
* transformation is confirmed. */
/* BLI_assert(is_cfra_eq(col->cfra, bezt[0].vec[1][0])); */
// BLI_assert(is_cfra_eq(col->cfra, bezt[0].vec[1][0]));
compute_keyblock_data(&block, bezt, bezt + 1);

View File

@ -4349,7 +4349,7 @@ static Base *mesh_separate_tagged(
Base *base_new = ED_object_add_duplicate(bmain, scene, view_layer, base_old, dupflag);
/* normally would call directly after but in this case delay recalc */
/* DAG_relations_tag_update(bmain); */
// DAG_relations_tag_update(bmain);
/* new in 2.5 */
BKE_object_material_array_assign(bmain,
@ -4423,7 +4423,7 @@ static Base *mesh_separate_arrays(Main *bmain,
Base *base_new = ED_object_add_duplicate(bmain, scene, view_layer, base_old, dupflag);
/* normally would call directly after but in this case delay recalc */
/* DAG_relations_tag_update(bmain); */
// DAG_relations_tag_update(bmain);
/* new in 2.5 */
BKE_object_material_array_assign(bmain,

View File

@ -591,7 +591,8 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key, Undo
um->me.key = NULL;
}
/* BM_mesh_validate(em->bm); */ /* for troubleshooting */
/* Uncomment for troubleshooting. */
// BM_mesh_validate(em->bm);
BM_mesh_bm_to_me(
NULL,

View File

@ -3385,7 +3385,8 @@ Base *ED_object_add_duplicate(
const int remap_flag = BKE_object_is_in_editmode(ob) ? ID_REMAP_FORCE_OBDATA_IN_EDITMODE : 0;
BKE_libblock_relink_to_newid(bmain, &ob->id, remap_flag);
/* DAG_relations_tag_update(bmain); */ /* caller must do */
/* Correct but the caller must do this. */
// DAG_relations_tag_update(bmain);
if (ob->data != nullptr) {
DEG_id_tag_update_ex(bmain, (ID *)ob->data, ID_RECALC_EDITORS);

View File

@ -2618,7 +2618,7 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
nullptr);
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, nullptr);
/* ED_undo_push(C, "Refresh Drivers"); No undo needed - shouldn't have any impact? */
// ED_undo_push(C, "Refresh Drivers"); /* No undo needed - shouldn't have any impact? */
break;
case OUTLINER_ANIMOP_CLEAR_DRV:

View File

@ -1212,8 +1212,8 @@ void transform_mode_init(TransInfo *t, wmOperator *op, const int mode)
}
/* TODO(germano): Some of these operations change the `t->mode`.
* This can be bad for Redo.
* BLI_assert(t->mode == mode); */
* This can be bad for Redo. */
// BLI_assert(t->mode == mode);
}
void transform_mode_default_modal_orientation_set(TransInfo *t, int type)

View File

@ -258,7 +258,7 @@ typedef enum PropertyFlag {
/**
* flag contains multiple enums.
* NOTE: not to be confused with prop->enumbitflags
* NOTE: not to be confused with `prop->enumbitflags`
* this exposes the flag as multiple options in python and the UI.
*
* \note These can't be animated so use with care.

View File

@ -2437,7 +2437,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) == false);
/* useful to check on bad values but set function should clamp */
/* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
// BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0);
if ((idprop = rna_idproperty_check(&prop, ptr))) {
RNA_property_int_clamp(ptr, prop, &value);
@ -3812,7 +3812,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
}
IDP_AppendArray(idprop, item);
/* IDP_AppendArray does a shallow copy (memcpy), only free memory. */
/* IDP_FreePropertyContent(item); */
// IDP_FreePropertyContent(item);
MEM_freeN(item);
rna_idproperty_touch(idprop);
}

View File

@ -94,7 +94,8 @@ Mesh *doEdgeSplit(const Mesh *mesh, EdgeSplitModifierData *emd)
BM_mesh_edgesplit(bm, false, true, false);
/* BM_mesh_validate(bm); */ /* for troubleshooting */
/* Uncomment for troubleshooting. */
// BM_mesh_validate(bm);
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, mesh);
BM_mesh_free(bm);

View File

@ -278,7 +278,7 @@ void BPY_app_handlers_reset(const short do_all)
}
else {
/* remove */
/* PySequence_DelItem(ls, i); */ /* more obvious but slower */
// PySequence_DelItem(ls, i); /* more obvious but slower */
PyList_SetSlice(ls, i, i + 1, NULL);
}
}

View File

@ -2396,7 +2396,7 @@ static ImBuf *do_solid_color(const SeqRenderData *context,
/** \} */
/* -------------------------------------------------------------------- */
/** \name Mulit-Camera Effect
/** \name Multi-Camera Effect
* \{ */
/** No effect inputs for multi-camera, we use #give_ibuf_seq. */