[Bf-blender-cvs] [7b663976645] master: Cleanup: spelling in comments, use C++ comments for disabled code

Campbell Barton noreply at git.blender.org
Tue Mar 8 04:01:59 CET 2022


Commit: 7b663976645973f15b243c101497626c590c2cde
Author: Campbell Barton
Date:   Tue Mar 8 13:48:31 2022 +1100
Branches: master
https://developer.blender.org/rB7b663976645973f15b243c101497626c590c2cde

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

===================================================================

M	source/blender/blenloader/BLO_read_write.h
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_legacy.c
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/blender/editors/animation/keyframes_keylist.cc
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/editmesh_undo.c
M	source/blender/editors/object/object_add.cc
M	source/blender/editors/space_outliner/outliner_tools.cc
M	source/blender/editors/transform/transform_mode.c
M	source/blender/makesrna/RNA_types.h
M	source/blender/makesrna/intern/rna_access.c
M	source/blender/modifiers/intern/MOD_edgesplit.c
M	source/blender/python/intern/bpy_app_handlers.c
M	source/blender/sequencer/intern/effects.c

===================================================================

diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.h
index 8f0f9fae97f..536c3989aff 100644
--- a/source/blender/blenloader/BLO_read_write.h
+++ b/source/blender/blenloader/BLO_read_write.h
@@ -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,
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9539436cf69..370137908c3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 2908b2b151b..5b026c1cca0 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -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;
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 10bdc2c7294..da138cf9216 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -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);
diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc
index 7dc3415c904..3356ef4d47d 100644
--- a/source/blender/editors/animation/keyframes_keylist.cc
+++ b/source/blender/editors/animation/keyframes_keylist.cc
@@ -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);
 
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2577218d6a9..6b3f50549ef 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -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,
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 3bebcdc9bae..9c7d712a739 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -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,
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index 7befad3b8d7..b8ffaf87118 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -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);
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 8fcf967bce8..fdefcc6133e 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -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:
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index 6162dfc9bb5..2fd81486bb6 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -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)
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 74bcc95d1dd..d4c38060e1b 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -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.
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 7ccb8181b51..a6fa369dc73 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -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);
   }
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index 9450a444042..b19caefae29 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -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);
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list