[Bf-blender-cvs] [ea0c86e961d] master: Cleanup: spelling in comments

Campbell Barton noreply at git.blender.org
Thu Mar 17 00:24:40 CET 2022


Commit: ea0c86e961de20d4215824d5cfd239a1f4c4cc90
Author: Campbell Barton
Date:   Thu Mar 17 10:04:45 2022 +1100
Branches: master
https://developer.blender.org/rBea0c86e961de20d4215824d5cfd239a1f4c4cc90

Cleanup: spelling in comments

Use <pre>..</pre> for pseudo-code.

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

M	source/blender/blenkernel/BKE_curves.hh
M	source/blender/blenkernel/intern/collection.c
M	source/blender/blenkernel/intern/image.cc
M	source/blender/blenkernel/intern/text.c
M	source/blender/blenlib/intern/path_util.c
M	source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
M	source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
M	source/blender/editors/curve/curve_intern.h
M	source/blender/editors/render/render_preview.cc
M	source/blender/makesdna/DNA_layer_types.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/render/intern/pipeline.c
M	source/blender/windowmanager/xr/intern/wm_xr_session.c

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

diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index 1354fc9ed25..c28886e8a52 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -40,7 +40,7 @@ namespace curves::nurbs {
 
 struct BasisCache {
   /**
-   * For each evaluated point, the weight for alls control points that influences it.
+   * For each evaluated point, the weight for all control points that influences it.
    * The vector's size is the evaluated point count multiplied by the spline's order.
    */
   Vector<float> weights;
@@ -343,7 +343,7 @@ void evaluate_segment(const float3 &point_0,
  * Calculate all evaluated points for the Bezier curve.
  *
  * \param evaluated_offsets: The index in the evaluated points array for each control point,
- * including the points from the corresponding segment. Used to varry the number of evaluated
+ * including the points from the corresponding segment. Used to vary the number of evaluated
  * points per segment, i.e. to make vector segment only have one edge. This is expected to be
  * calculated by #calculate_evaluated_offsets, and is the reason why this function doesn't need
  * arguments like "cyclic" and "resolution".
@@ -428,7 +428,7 @@ void calculate_basis_cache(int size,
  *
  * \param control_weights: An optional span of control point weights, which must have the same size
  * as the number of control points in the curve if provided. Using this argument gives a NURBS
- * curve the "Rational" behavior that's part of its acryonym; otherwise it is a NUBS.
+ * curve the "Rational" behavior that's part of its acronym; otherwise it is a NUBS.
  */
 void interpolate_to_evaluated(const BasisCache &basis_cache,
                               int8_t order,
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index af776e9dbb0..891145b47c9 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -129,7 +129,7 @@ static void collection_free_data(ID *id)
 {
   Collection *collection = (Collection *)id;
 
-  /* No animdata here. */
+  /* No animation-data here. */
   BKE_previewimg_free(&collection->preview);
 
   BLI_freelistN(&collection->gobject);
diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc
index 88888831e1c..d78d508336b 100644
--- a/source/blender/blenkernel/intern/image.cc
+++ b/source/blender/blenkernel/intern/image.cc
@@ -5268,7 +5268,7 @@ static int image_get_multiview_index(Image *ima, ImageUser *iuser)
   }
   if (is_backdrop) {
     if (BKE_image_is_stereo(ima)) {
-      /* backdrop hackaround (since there is no iuser */
+      /* Backdrop hack / workaround (since there is no `iuser`). */
       return ima->eye;
     }
   }
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 991fd9e3aff..43b2db0d62c 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -143,7 +143,7 @@ static void text_copy_data(Main *UNUSED(bmain),
 /** Free (or release) any data used by this text (does not free the text itself). */
 static void text_free_data(ID *id)
 {
-  /* No animdata here. */
+  /* No animation-data here. */
   Text *text = (Text *)id;
 
   BKE_text_free_lines(text);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index f94d49cf1dd..6c576627fa0 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -313,8 +313,8 @@ bool BLI_filename_make_safe(char *fname)
 
 bool BLI_path_make_safe(char *path)
 {
-  /* Simply apply BLI_filename_make_safe() over each component of the path.
-   * Luckily enough, same 'safe' rules applies to filenames and dirnames. */
+  /* Simply apply #BLI_filename_make_safe() over each component of the path.
+   * Luckily enough, same 'safe' rules applies to file & directory names. */
   char *curr_slash, *curr_path = path;
   bool changed = false;
   bool skip_first = false;
diff --git a/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc b/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
index 95cf0f17d2e..fabc2412828 100644
--- a/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
+++ b/source/blender/blenlib/tests/BLI_mesh_boolean_test.cc
@@ -39,11 +39,13 @@ class IMeshBuilder {
     return std::pair<int, int>(e_index / MAX_FACE_LEN, e_index % MAX_FACE_LEN);
   }
 
-  /*
+  /**
    * Spec should have form:
-   *  #verts #faces
-   *  mpq_class mpq_class mpq_clas [#verts lines]
-   *  int int int ... [#faces lines; indices into verts for given face]
+   * <pre>
+   * #verts #faces
+   * mpq_class mpq_class mpq_clas [#verts lines]
+   * int int int ... [#faces lines; indices into verts for given face]
+   * </pre>
    */
   IMeshBuilder(const char *spec)
   {
diff --git a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
index 4ddf656ff2e..d6a7a338d13 100644
--- a/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
+++ b/source/blender/blenlib/tests/BLI_mesh_intersect_test.cc
@@ -42,11 +42,13 @@ class IMeshBuilder {
     return std::pair<int, int>(e_index / MAX_FACE_LEN, e_index % MAX_FACE_LEN);
   }
 
-  /*
+  /**
    * Spec should have form:
-   *  #verts #faces
-   *  mpq_class mpq_class mpq_clas [#verts lines]
-   *  int int int ... [#faces lines; indices into verts for given face]
+   * <pre>
+   * #verts #faces
+   * mpq_class mpq_class mpq_clas [#verts lines]
+   * int int int ... [#faces lines; indices into verts for given face]
+   * </pre>
    */
   IMeshBuilder(const char *spec)
   {
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index c3ea36fcda5..8bfabe23ea1 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -181,6 +181,7 @@ void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot);
 void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
 
 /* editcurve_query.c */
+
 bool ED_curve_pick_vert(struct ViewContext *vc,
                         short sel,
                         struct Nurb **r_nurb,
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc
index 57858b202d2..16a3e799779 100644
--- a/source/blender/editors/render/render_preview.cc
+++ b/source/blender/editors/render/render_preview.cc
@@ -459,11 +459,11 @@ static Scene *preview_prepare_scene(
   if (sce) {
     ViewLayer *view_layer = static_cast<ViewLayer *>(sce->view_layers.first);
 
-    /* Only enable the combined renderpass */
+    /* Only enable the combined render-pass. */
     view_layer->passflag = SCE_PASS_COMBINED;
     view_layer->eevee.render_passes = 0;
 
-    /* this flag tells render to not execute depsgraph or ipos etc */
+    /* This flag tells render to not execute depsgraph or F-Curves etc. */
     sce->r.scemode |= R_BUTS_PREVIEW;
     BLI_strncpy(sce->r.engine, scene->r.engine, sizeof(sce->r.engine));
 
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index 465ec6e7db5..7b6fe3773f8 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -113,7 +113,7 @@ typedef struct ViewLayerEEVEE {
   int _pad[1];
 } ViewLayerEEVEE;
 
-/* AOV Renderpass definition. */
+/** AOV Render-pass definition. */
 typedef struct ViewLayerAOV {
   struct ViewLayerAOV *next, *prev;
 
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index e6c163d94ba..c3335f7959e 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -782,7 +782,7 @@ typedef struct FileSelectParams {
   char _pad1[2];
 
   /* short */
-  /** XXXXX for now store type here, should be moved to the operator. */
+  /** XXX: for now store type here, should be moved to the operator. */
   short type; /* eFileSelectType */
   /** Settings for filter, hiding dots files. */
   short flag;
@@ -797,7 +797,7 @@ typedef struct FileSelectParams {
   /** Filter when (flags & FILE_FILTER) is true. */
   int filter;
 
-  /** Max number of levels in dirtree to show at once, 0 to disable recursion. */
+  /** Max number of levels in directory tree to show at once, 0 to disable recursion. */
   short recursion_level;
 
   char _pad4[2];
diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c
index f66d65ce68c..a025afe4f6a 100644
--- a/source/blender/render/intern/pipeline.c
+++ b/source/blender/render/intern/pipeline.c
@@ -711,11 +711,9 @@ static void re_init_resolution(Render *re, Render *source, int winx, int winy, r
   re->winx = winx;
   re->winy = winy;
   if (source && (source->r.mode & R_BORDER)) {
-    /* eeh, doesn't seem original bordered disprect is storing anywhere
-     * after insertion on black happening in do_render_engine(),
-     * so for now simply re-calculate disprect using border from source
-     * renderer (sergey)
-     */
+    /* NOTE(@sergey): doesn't seem original bordered `disprect` is storing anywhere
+     * after insertion on black happening in #do_render_engine(),
+     * so for now simply re-calculate `disprect` using border from source renderer. */
 
     re->disprect.xmin = source->r.border.xmin * winx;
     re->disprect.xmax = source->r.border.xmax * winx;
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c b/source/blender/windowmanager/xr/intern/wm_xr_session.c
index dfeaeae196c..f1ccaadc1e4 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_session.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c
@@ -1304,7 +1304,7 @@ static void wm_xr_session_surface_draw(bContext *C)
 
   GHOST_XrSessionDrawViews(wm->xr.runtime->context, &draw_data);
 
-  /* There's no active framebuffer if the session was cancelled (exception while drawing views). */
+  /* There's no active frame-buffer if the session was canceled (exception while drawing views). */
   if (GPU_framebuffer_active_get(

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list