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

Campbell Barton noreply at git.blender.org
Tue Jan 31 04:24:11 CET 2023


Commit: 27b4916b1a903f4d6322cb0f7dfcc9f189bbc9b5
Author: Campbell Barton
Date:   Tue Jan 31 14:22:22 2023 +1100
Branches: master
https://developer.blender.org/rB27b4916b1a903f4d6322cb0f7dfcc9f189bbc9b5

Cleanup: spelling in comments

Also minor changes in comments:
- Reference BLENDER_HISTORY_FILE instead of the literal file-name
  (simplifies looking up usage).
- Use usernames in tags, as noted in code-style.

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

M	intern/cycles/kernel/device/oneapi/compat.h
M	intern/ghost/intern/GHOST_ContextCGL.h
M	source/blender/blenkernel/BKE_curves.hh
M	source/blender/blenkernel/BKE_mesh_mapping.h
M	source/blender/blenkernel/intern/blendfile.cc
M	source/blender/blenkernel/intern/brush.cc
M	source/blender/blenkernel/intern/constraint.c
M	source/blender/blenkernel/intern/fluid.cc
M	source/blender/blenkernel/intern/mesh_legacy_convert.cc
M	source/blender/blenkernel/intern/mesh_mapping.cc
M	source/blender/blenkernel/intern/multires_reshape_smooth.cc
M	source/blender/blenkernel/intern/pbvh_intern.h
M	source/blender/blenkernel/intern/softbody.c
M	source/blender/blenkernel/intern/subsurf_ccg.cc
M	source/blender/bmesh/intern/bmesh_opdefines.c
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh
M	source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc
M	source/blender/draw/engines/workbench/workbench_engine.cc
M	source/blender/draw/engines/workbench/workbench_mesh_passes.cc
M	source/blender/draw/engines/workbench/workbench_private.hh
M	source/blender/draw/engines/workbench/workbench_resources.cc
M	source/blender/draw/engines/workbench/workbench_shadow.cc
M	source/blender/draw/engines/workbench/workbench_state.cc
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_bake.cc
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/transform/transform_snap_object.cc
M	source/blender/editors/uvedit/uvedit_smart_stitch.c
M	source/blender/geometry/intern/mesh_merge_by_distance.cc
M	source/blender/gpu/metal/mtl_shader.mm
M	source/blender/io/usd/intern/usd_asset_utils.cc
M	source/blender/io/usd/tests/usd_export_test.cc
M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesdna/DNA_windowmanager_types.h
M	source/blender/windowmanager/intern/wm_files.cc
M	source/blender/windowmanager/intern/wm_init_exit.cc
M	source/blender/windowmanager/intern/wm_window.c

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

diff --git a/intern/cycles/kernel/device/oneapi/compat.h b/intern/cycles/kernel/device/oneapi/compat.h
index a43b68e5b49..73384b7be59 100644
--- a/intern/cycles/kernel/device/oneapi/compat.h
+++ b/intern/cycles/kernel/device/oneapi/compat.h
@@ -195,9 +195,9 @@ using sycl::half;
 #define fmodf(x, y) sycl::fmod((x), (y))
 #define lgammaf(x) sycl::lgamma((x))
 
-/* sycl::native::cos precision is not sufficient and -ffast-math lets
- * the current DPC++ compiler overload sycl::cos with it.
- * We work around this issue by directly calling the spirv implementation which
+/* `sycl::native::cos` precision is not sufficient and `-ffast-math` lets
+ * the current DPC++ compiler overload `sycl::cos` with it.
+ * We work around this issue by directly calling the SPIRV implementation which
  * provides greater precision. */
 #if defined(__SYCL_DEVICE_ONLY__) && defined(__SPIR__)
 #  define cosf(x) __spirv_ocl_cos(((float)(x)))
diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h
index 60098c99fe3..3134606d59b 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.h
+++ b/intern/ghost/intern/GHOST_ContextCGL.h
@@ -27,11 +27,11 @@ class GHOST_ContextCGL : public GHOST_Context {
  public:
   /* Defines the number of simultaneous command buffers which can be in flight.
    * The default limit of `64` is considered to be optimal for Blender. Too many command buffers
-   * will result in workload fragmnetation and additional system-level overhead. This limit should
+   * will result in workload fragmentation and additional system-level overhead. This limit should
    * also only be increased if the application is consistently exceeding the limit, and there are
    * no command buffer leaks.
    *
-   * If this limit is reached, starting a new command buffer will fail. The Metal backend will
+   * If this limit is reached, starting a new command buffer will fail. The Metal back-end will
    * therefore stall until completion and log a warning when this limit is reached in order to
    * ensure correct function of the app.
    *
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index 1b52fe709ac..e22348106db 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -692,7 +692,7 @@ int calculate_evaluated_num(int points_num, bool cyclic, int resolution);
 void interpolate_to_evaluated(GSpan src, bool cyclic, int resolution, GMutableSpan dst);
 
 /**
- * Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is desribed by
+ * Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is described by
  * #evaluated_offsets.
  */
 void interpolate_to_evaluated(const GSpan src,
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h
index 4db3ea414f4..46f62220d91 100644
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@ -100,6 +100,7 @@ typedef struct MeshElemMap {
 } MeshElemMap;
 
 /* mapping */
+
 UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
                                        const bool *hide_poly,
                                        const bool *select_poly,
diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc
index 68f37df9ca9..e151c671b06 100644
--- a/source/blender/blenkernel/intern/blendfile.cc
+++ b/source/blender/blenkernel/intern/blendfile.cc
@@ -382,7 +382,7 @@ static void setup_app_data(bContext *C,
     STRNCPY(bmain->filepath, bfd->filepath);
   }
 
-  /* baseflags, groups, make depsgraph, etc */
+  /* Base-flags, groups, make depsgraph, etc. */
   /* first handle case if other windows have different scenes visible */
   if (mode == LOAD_UI) {
     wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc
index 015b54f9e75..a8482f905d1 100644
--- a/source/blender/blenkernel/intern/brush.cc
+++ b/source/blender/blenkernel/intern/brush.cc
@@ -151,7 +151,8 @@ static void brush_make_local(Main *bmain, ID *id, const int flags)
   BKE_lib_id_make_local_generic_action_define(bmain, id, flags, &force_local, &force_copy);
 
   if (brush->clone.image) {
-    /* Special case: ima always local immediately. Clone image should only have one user anyway. */
+    /* Special case: `ima` always local immediately.
+     * Clone image should only have one user anyway. */
     /* FIXME: Recursive calls affecting other non-embedded IDs are really bad and should be avoided
      * in IDType callbacks. Higher-level ID management code usually does not expect such things and
      * does not deal properly with it. */
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index fbaadca09cd..fa9a18859b8 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -4528,7 +4528,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3],
       }
     }
     else if (norm < 0.1f) {
-      /* near 0 and Pi arcsin has way better precision than arccos */
+      /* Near 0 and Pi `arcsin` has way better precision than `arccos`. */
       rangle = (rangle > M_PI_2) ? M_PI - asinf(norm) : asinf(norm);
     }
 
diff --git a/source/blender/blenkernel/intern/fluid.cc b/source/blender/blenkernel/intern/fluid.cc
index 912775f3bd1..47099b1714e 100644
--- a/source/blender/blenkernel/intern/fluid.cc
+++ b/source/blender/blenkernel/intern/fluid.cc
@@ -721,7 +721,7 @@ static void bb_combineMaps(FluidObjectBB *output,
 {
   int i, x, y, z;
 
-  /* Copyfill input 1 struct and clear output for new allocation. */
+  /* Copy-fill input 1 struct and clear output for new allocation. */
   FluidObjectBB bb1;
   memcpy(&bb1, output, sizeof(FluidObjectBB));
   memset(output, 0, sizeof(FluidObjectBB));
@@ -3539,7 +3539,7 @@ static int manta_step(
 
   BLI_mutex_lock(&object_update_lock);
 
-  /* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual framelength. */
+  /* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual frame-length. */
   while (time_per_frame + FLT_EPSILON < frame_length) {
     manta_adapt_timestep(fds->fluid);
     dt = manta_get_timestep(fds->fluid);
@@ -3582,7 +3582,7 @@ static int manta_step(
     fds->time_total = time_total;
   }
 
-  /* Total time must not exceed framecount times framelength. Correct tiny errors here. */
+  /* Total time must not exceed frame-count times frame-length. Correct tiny errors here. */
   CLAMP_MAX(fds->time_total, time_total_old + fds->frame_length);
 
   /* Compute shadow grid for gas simulations. Make sure to skip if bake job was canceled early. */
@@ -4652,7 +4652,7 @@ void BKE_fluid_fields_sanitize(FluidDomainSettings *settings)
       settings->coba_field = FLUID_DOMAIN_FIELD_DENSITY;
     }
 
-    /* Gas domains do not support vdb mini precision. */
+    /* Gas domains do not support VDB mini precision. */
     if (data_depth == VDB_PRECISION_MINI_FLOAT) {
       settings->openvdb_data_depth = VDB_PRECISION_HALF_FLOAT;
     }
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index 4926be66d27..5913751aac9 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -1163,17 +1163,17 @@ static int mesh_tessface_calc(Mesh &mesh,
   CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface);
   add_mface_layers(mesh, fdata, ldata, totface);
 
-  /* NOTE: quad detection issue - fourth vertidx vs fourth loopidx:
+  /* NOTE: quad detection issue - fourth vertex-index vs fourth loop-index:
    * Polygons take care of their loops ordering, hence not of their vertices ordering.
    * Currently, our tfaces' fourth vertex index might be 0 even for a quad.
    * However, we know our fourth loop index is never 0 for quads
    * (because they are sorted for polygons, and our quads are still mere copies of their polygons).
-   * So we pass nullptr as MFace pointer, and #mesh_loops_to_tessdata
+   * So we pass nullptr as #MFace pointer, and #mesh_loops_to_tessdata
    * will use the fourth loop index as quad test. */
   mesh_loops_to_tessdata(fdata, ldata, nullptr, mface_to_poly_map, lindices, totface);
 
-  /* NOTE: quad detection issue - fourth vertidx vs fourth loopidx:
-   * ...However, most TFace code uses 'MFace->v4 == 0' test to check whether it is a tri or quad.
+  /* NOTE: quad detection issue - fourth vert-index vs fourth loop-index:
+   * ...However, most #TFace code uses `MFace->v4 == 0` test to check whether it is a tri or quad.
    * BKE_mesh_mface_index_validate() will check this and rotate the tessellated face if needed.
    */
 #ifdef USE_TESSFACE_QUADS
diff --git a/source/blender/blenkernel/intern/mesh_mapping.cc b/source/blender/blenkernel/intern/mesh_mapping.cc
index 32c8638fbcf..780e32d540a 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.cc
+++ b/source/blender/blenkernel/intern/mesh_mapping.cc
@@ -29,7 +29,6 @@
 /** \name Mesh Connectivity Mapping
  * \{ */
 
-/* ngon version wip, based on BM_uv_vert_map_create */
 UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly,
                                        const bool *hide_poly,
                                        const bool *select_poly,
@@ -41,6 +40,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly,
                                        const bool selected,
                                        const bool use_winding)
 {
+  /* NOTE: N-gon version WIP, based on #BM_uv_vert_map_create. */
+
   UvVertMap *vmap;
   UvMapVert *buf;
   const MPoly *mp;
diff --git a/source/blender/blenkernel/intern/multires_reshape_smooth.cc b/source/blender/blenkernel/intern/multires_reshape_smooth.cc
index a248251946a..c77c2f10785 100644
--- a/source/blender/blenkernel/intern/multires_reshape_smooth.cc
+++ b/source/blender/blenkernel/intern/multires_reshape_smooth.cc
@@ -104,7 +104,

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list