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

Campbell Barton noreply at git.blender.org
Fri Feb 3 05:08:14 CET 2023


Commit: 266d8de6876cd1f2ae4624aedaacee93024e33f4
Author: Campbell Barton
Date:   Fri Feb 3 12:41:01 2023 +1100
Branches: master
https://developer.blender.org/rB266d8de6876cd1f2ae4624aedaacee93024e33f4

Cleanup: spelling in comments

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

M	intern/cycles/device/oneapi/device_impl.cpp
M	source/blender/blenkernel/intern/anim_visualization.c
M	source/blender/blenkernel/intern/customdata.cc
M	source/blender/blenkernel/intern/main_idmap.c
M	source/blender/blenkernel/intern/writeffmpeg.c
M	source/blender/blenlib/intern/BLI_heap.c
M	source/blender/blenlib/intern/mesh_boolean.cc
M	source/blender/blenlib/intern/mesh_intersect.cc
M	source/blender/bmesh/intern/bmesh_polygon_edgenet.h
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/blender/bmesh/tools/bmesh_region_match.c
M	source/blender/editors/object/object_vgroup.cc
M	source/blender/gpu/intern/gpu_immediate_util.c
M	source/blender/modifiers/intern/MOD_skin.c
M	source/blender/windowmanager/WM_types.h
M	source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c
M	source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
M	source/blender/windowmanager/intern/wm_draw.c
M	source/blender/windowmanager/intern/wm_operator_type.c

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

diff --git a/intern/cycles/device/oneapi/device_impl.cpp b/intern/cycles/device/oneapi/device_impl.cpp
index 1915ffc862c..0aec8268bd5 100644
--- a/intern/cycles/device/oneapi/device_impl.cpp
+++ b/intern/cycles/device/oneapi/device_impl.cpp
@@ -377,7 +377,7 @@ void OneapiDevice::tex_alloc(device_texture &mem)
   generic_alloc(mem);
   generic_copy_to(mem);
 
-  /* Resize if needed. Also, in case of resize - allocate in advance for future allocs. */
+  /* Resize if needed. Also, in case of resize - allocate in advance for future allocations. */
   const uint slot = mem.slot;
   if (slot >= texture_info_.size()) {
     texture_info_.resize(slot + 128);
diff --git a/source/blender/blenkernel/intern/anim_visualization.c b/source/blender/blenkernel/intern/anim_visualization.c
index 799845cbce8..31335931704 100644
--- a/source/blender/blenkernel/intern/anim_visualization.c
+++ b/source/blender/blenkernel/intern/anim_visualization.c
@@ -128,7 +128,7 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports,
     dst = &ob->mpath;
   }
 
-  /* avoid 0 size allocs */
+  /* Avoid 0 size allocations. */
   if (avs->path_sf >= avs->path_ef) {
     BKE_reportf(reports,
                 RPT_ERROR,
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index 227c1ee1bee..b71a705eecb 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -237,8 +237,8 @@ static void layerInterp_mdeformvert(const void **sources,
                                     const int count,
                                     void *dest)
 {
-  /* a single linked list of MDeformWeight's
-   * use this to avoid double allocs (which LinkNode would do) */
+  /* A single linked list of #MDeformWeight's.
+   * use this to avoid double allocations (which #LinkNode would do). */
   struct MDeformWeight_Link {
     struct MDeformWeight_Link *next;
     MDeformWeight dw;
diff --git a/source/blender/blenkernel/intern/main_idmap.c b/source/blender/blenkernel/intern/main_idmap.c
index 24c1da782fe..b280c962a39 100644
--- a/source/blender/blenkernel/intern/main_idmap.c
+++ b/source/blender/blenkernel/intern/main_idmap.c
@@ -57,7 +57,7 @@ struct IDNameLib_Map {
   struct GSet *valid_id_pointers;
   int idmap_types;
 
-  /* For storage of keys for the TypeMap ghash, avoids many single allocs. */
+  /* For storage of keys for the #TypeMap #GHash, avoids many single allocations. */
   BLI_mempool *type_maps_keys_pool;
 };
 
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index afb9f530d8e..be8f985ec56 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -469,18 +469,18 @@ static AVRational calc_time_base(uint den, double num, int codec_id)
 static const AVCodec *get_av1_encoder(
     FFMpegContext *context, RenderData *rd, AVDictionary **opts, int rectx, int recty)
 {
-  /* There are three possible encoders for AV1: libaom-av1, librav1e, and libsvtav1. librav1e tends
-   * to give the best compression quality while libsvtav1 tends to be the fastest encoder. One of
-   * each will be picked based on the preset setting, and if a particular encoder is not available,
-   * then use the default returned by FFMpeg. */
+  /* There are three possible encoders for AV1: `libaom-av1`, librav1e, and `libsvtav1`. librav1e
+   * tends to give the best compression quality while `libsvtav1` tends to be the fastest encoder.
+   * One of each will be picked based on the preset setting, and if a particular encoder is not
+   * available, then use the default returned by FFMpeg. */
   const AVCodec *codec = NULL;
   switch (context->ffmpeg_preset) {
     case FFM_PRESET_BEST:
-      /* libaom-av1 may produce better VMAF-scoring videos in serveral cases, but there are cases
-       * where using a different encoder is desireable, such as in T103849. */
+      /* `libaom-av1` may produce better VMAF-scoring videos in several cases, but there are cases
+       * where using a different encoder is desirable, such as in T103849. */
       codec = avcodec_find_encoder_by_name("librav1e");
       if (!codec) {
-        /* Fallback to libaom-av1 if librav1e is not found. */
+        /* Fallback to `libaom-av1` if librav1e is not found. */
         codec = avcodec_find_encoder_by_name("libaom-av1");
       }
       break;
@@ -525,8 +525,8 @@ static const AVCodec *get_av1_encoder(
           break;
       }
       if (context->ffmpeg_crf >= 0) {
-        /* librav1e does not use -crf, but uses -qp in the range of 0-255. Calculates the roughly
-         * equivalent float, and truncates it to an integer. */
+        /* librav1e does not use `-crf`, but uses `-qp` in the range of 0-255.
+         * Calculates the roughly equivalent float, and truncates it to an integer. */
         unsigned int qp_value = ((float)context->ffmpeg_crf) * 255.0F / 51.0F;
         if (qp_value > 255) {
           qp_value = 255;
@@ -540,7 +540,7 @@ static const AVCodec *get_av1_encoder(
     }
     else if (STREQ(codec->name, "libsvtav1")) {
       /* Set preset value based on ffmpeg_preset.
-       * Must check context->ffmpeg_preset again in case this encoder was selected due to the
+       * Must check `context->ffmpeg_preset` again in case this encoder was selected due to the
        * absence of another. */
       switch (context->ffmpeg_preset) {
         case FFM_PRESET_REALTIME:
@@ -555,13 +555,13 @@ static const AVCodec *get_av1_encoder(
           break;
       }
       if (context->ffmpeg_crf >= 0) {
-        /* libsvtav1 does not support crf until FFmpeg builds since 2022-02-24, use qp as fallback.
-         */
+        /* `libsvtav1` does not support `crf` until FFmpeg builds since 2022-02-24,
+         * use `qp` as fallback. */
         ffmpeg_dict_set_int(opts, "qp", context->ffmpeg_crf);
       }
     }
     else if (STREQ(codec->name, "libaom-av1")) {
-      /* Speed up libaom-av1 encoding by enabling multithreading and setting tiles. */
+      /* Speed up libaom-av1 encoding by enabling multi-threading and setting tiles. */
       ffmpeg_dict_set_int(opts, "row-mt", 1);
       const char *tiles_string = NULL;
       bool tiles_string_is_dynamic = false;
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c
index 0bc50f62232..6ca881e5ab2 100644
--- a/source/blender/blenlib/intern/BLI_heap.c
+++ b/source/blender/blenlib/intern/BLI_heap.c
@@ -34,7 +34,7 @@ struct HeapNode_Chunk {
  * Number of nodes to include per #HeapNode_Chunk when no reserved size is passed,
  * or we allocate past the reserved number.
  *
- * \note Optimize number for 64kb allocs.
+ * \note Optimize number for 64kb allocations.
  * \note keep type in sync with nodes_num in heap_node_alloc_chunk.
  */
 #define HEAP_CHUNK_DEFAULT_NUM \
diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc
index 354f241a292..9de75de5ffa 100644
--- a/source/blender/blenlib/intern/mesh_boolean.cc
+++ b/source/blender/blenlib/intern/mesh_boolean.cc
@@ -1746,7 +1746,7 @@ static int find_containing_cell(const Vert *v,
  * (Adapted from #closest_on_tri_to_point_v3()).
  * The arguments ab, ac, ..., r are used as temporaries
  * in this routine. Passing them in from the caller can
- * avoid many allocs and frees of temporary mpq3 values
+ * avoid many allocations and frees of temporary mpq3 values
  * and the mpq_class values within them.
  */
 static mpq_class closest_on_tri_to_point(const mpq3 &p,
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index d4d86e678c5..7b82ee4e6cd 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1147,7 +1147,7 @@ static int filter_plane_side(const double3 &p,
  * This works because the ratio of the projections of ab and ac onto n is the same as
  * the ratio along the line ab of the intersection point to the whole of ab.
  * The ab, ac, and dotbuf arguments are used as a temporaries; declaring them
- * in the caller can avoid many allocs and frees of mpq3 and mpq_class structures.
+ * in the caller can avoid many allocations and frees of mpq3 and mpq_class structures.
  */
 static inline mpq3 tti_interp(
     const mpq3 &a, const mpq3 &b, const mpq3 &c, const mpq3 &n, mpq3 &ab, mpq3 &ac, mpq3 &dotbuf)
@@ -1167,7 +1167,7 @@ static inline mpq3 tti_interp(
  * order. This is the same as -oriented(a, b, c, a + ad), but uses fewer arithmetic operations.
  * TODO: change arguments to `const Vert *` and use floating filters.
  * The ba, ca, n, and dotbuf arguments are used as temporaries; declaring them
- * in the caller can avoid many allocs and frees of mpq3 and mpq_class structures.
+ * in the caller can avoid many allocations and frees of mpq3 and mpq_class structures.
  */
 static inline int tti_above(const mpq3 &a,
                             const mpq3 &b,
diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.h b/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
index 43da40d60af..e06760dbfad 100644
--- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
+++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
@@ -30,7 +30,7 @@ bool BM_face_split_edgenet(BMesh *bm,
  *
  * \param use_partial_connect: Support for handling islands connected by only a single edge,
  * \note that this is quite slow so avoid using where possible.
- * \param mem_arena: Avoids many small allocs & should be cleared after each use.
+ * \param mem_arena: Avoids many small allocations & should be cleared after each use.
  * take care since \a edge_net_new is stored in \a r_edge_net_new.
  */
 bool BM_face_split_edgenet_connect_islands(BMesh *bm,
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 4215ec2b25b..36222ffa1f0 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -307,7 +307,10 @@ typedef struct BevelParams {
   GHash *vert_hash;
   /** Records new faces: key BMFace*, value one of {VERT/EDGE/RECON}_POLY. 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list