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

Campbell Barton noreply at git.blender.org
Thu Jan 20 02:00:08 CET 2022


Commit: eb3ff1d6f9ca231f7cfde4a5b8255fa895d80d00
Author: Campbell Barton
Date:   Thu Jan 20 11:55:33 2022 +1100
Branches: master
https://developer.blender.org/rBeb3ff1d6f9ca231f7cfde4a5b8255fa895d80d00

Cleanup: spelling in comments

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

M	intern/ghost/intern/GHOST_WindowX11.cpp
M	source/blender/blenlib/intern/math_base_inline.c
M	source/blender/blenlib/intern/math_geom.c
M	source/blender/blenlib/intern/timecode.c
M	source/blender/bmesh/intern/bmesh_mesh.c
M	source/blender/bmesh/operators/bmo_create.c
M	source/blender/bmesh/operators/bmo_hull.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/gpu/intern/gpu_capabilities_private.hh
M	source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
M	source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc

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

diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 8b44403c598..c77ef162d9a 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -544,7 +544,7 @@ void GHOST_WindowX11::refreshXInputDevices()
     std::vector<XEventClass> xevents;
 
     for (GHOST_SystemX11::GHOST_TabletX11 &xtablet : m_system->GetXTablets()) {
-      /* With modern XInput (xlib 1.6.2 at least and/or evdev 2.9.0) and some 'no-name' tablets
+      /* With modern XInput (XLIB 1.6.2 at least and/or EVDEV 2.9.0) and some 'no-name' tablets
        * like 'UC-LOGIC Tablet WP5540U', we also need to 'select' ButtonPress for motion event,
        * otherwise we do not get any tablet motion event once pen is pressed... See T43367.
        */
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 53cf2d61963..cfcc54b1136 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -398,7 +398,7 @@ MINLINE float fractf(float a)
   return a - floorf(a);
 }
 
-/* Adapted from godot-engine math_funcs.h. */
+/* Adapted from `godot-engine` math_funcs.h. */
 MINLINE float wrapf(float value, float max, float min)
 {
   float range = max - min;
@@ -722,15 +722,15 @@ MINLINE int integer_digits_i(const int i)
 
 #ifdef BLI_HAVE_SSE2
 
-/* Calculate initial guess for arg^exp based on float representation
+/**
+ * Calculate initial guess for `arg^exp` based on float representation
  * This method gives a constant bias, which can be easily compensated by
  * multiplying with bias_coeff.
- * Gives better results for exponents near 1 (e. g. 4/5).
+ * Gives better results for exponents near 1 (e.g. `4/5`).
  * exp = exponent, encoded as uint32_t
- * e2coeff = 2^(127/exponent - 127) * bias_coeff^(1/exponent), encoded as
- * uint32_t
+ * `e2coeff = 2^(127/exponent - 127) * bias_coeff^(1/exponent)`, encoded as `uint32_t`.
  *
- * We hope that exp and e2coeff gets properly inlined
+ * We hope that exp and e2coeff gets properly inlined.
  */
 MALWAYS_INLINE __m128 _bli_math_fastpow(const int exp, const int e2coeff, const __m128 arg)
 {
@@ -742,7 +742,7 @@ MALWAYS_INLINE __m128 _bli_math_fastpow(const int exp, const int e2coeff, const
   return ret;
 }
 
-/* Improve x ^ 1.0f/5.0f solution with Newton-Raphson method */
+/** Improve `x ^ 1.0f/5.0f` solution with Newton-Raphson method */
 MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result, const __m128 x)
 {
   __m128 approx2 = _mm_mul_ps(old_result, old_result);
@@ -752,7 +752,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result
   return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
 }
 
-/* Calculate powf(x, 2.4). Working domain: 1e-10 < x < 1e+10 */
+/** Calculate `powf(x, 2.4)`. Working domain: `1e-10 < x < 1e+10`. */
 MALWAYS_INLINE __m128 _bli_math_fastpow24(const __m128 arg)
 {
   /* max, avg and |avg| errors were calculated in gcc without FMA instructions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index a155877513a..3800fc58a5b 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -3720,7 +3720,7 @@ void barycentric_weights_v2_quad(const float v1[2],
   /* NOTE(campbell): fabsf() here is not needed for convex quads
    * (and not used in #interp_weights_poly_v2).
    * But in the case of concave/bow-tie quads for the mask rasterizer it
-   * gives unreliable results without adding absf(). If this becomes an issue for more general
+   * gives unreliable results without adding `absf()`. If this becomes an issue for more general
    * usage we could have this optional or use a different function. */
 #define MEAN_VALUE_HALF_TAN_V2(_area, i1, i2) \
   ((_area = cross_v2v2(dirs[i1], dirs[i2])) != 0.0f ? \
diff --git a/source/blender/blenlib/intern/timecode.c b/source/blender/blenlib/intern/timecode.c
index 55131fa639d..14adab8648b 100644
--- a/source/blender/blenlib/intern/timecode.c
+++ b/source/blender/blenlib/intern/timecode.c
@@ -49,7 +49,7 @@ size_t BLI_timecode_string_from_time(char *str,
 
   /* get cframes */
   if (time < 0) {
-    /* correction for negative cfraues */
+    /* Correction for negative cframes. */
     neg[0] = '-';
     time = -time;
   }
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index ad52daa4731..b65f6e4c872 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -928,7 +928,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const
 
   /* Edges' pointers, only vert pointers (as we don't mess with loops!),
    * and - ack! - edge pointers,
-   * as we have to handle disklinks... */
+   * as we have to handle disk-links. */
   if (vptr_map || eptr_map) {
     BM_ITER_MESH (ed, &iter, bm, BM_EDGES_OF_MESH) {
       if (vptr_map) {
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c
index c337724d096..6bb2830c71b 100644
--- a/source/blender/bmesh/operators/bmo_create.c
+++ b/source/blender/bmesh/operators/bmo_create.c
@@ -17,7 +17,7 @@
 /** \file
  * \ingroup bmesh
  *
- * Create faces or edges (Fkey by default).
+ * Create faces or edges (F-key by default).
  */
 
 #include "MEM_guardedalloc.h"
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 740815691cc..f6cdb18f982 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -30,7 +30,7 @@
 
 #  include "RBI_hull_api.h"
 
-/* XXX: using 128 for totelem and pchunk of mempool, no idea what good
+/* XXX: using 128 for totelem and `pchunk` of `mempool`, no idea what good
  * values would be though */
 
 #  include "bmesh.h"
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 53ecc4a8314..f84380b4f64 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1544,7 +1544,7 @@ void SCULPT_OT_mask_init(struct wmOperatorType *ot);
 /* Detail size. */
 
 /* -------------------------------------------------------------------- */
-/** \name Dyntopo/Retopo Operators
+/** \name Dyntopo/Retopology Operators
  * \{ */
 
 void SCULPT_OT_detail_flood_fill(struct wmOperatorType *ot);
diff --git a/source/blender/gpu/intern/gpu_capabilities_private.hh b/source/blender/gpu/intern/gpu_capabilities_private.hh
index 95cf7fd335d..1f94b6715f1 100644
--- a/source/blender/gpu/intern/gpu_capabilities_private.hh
+++ b/source/blender/gpu/intern/gpu_capabilities_private.hh
@@ -29,10 +29,10 @@ namespace blender::gpu {
 
 /**
  * This includes both hardware capabilities & workarounds.
- * Try to limit these to the implementation codebase (i.e.: gpu/opengl/).
+ * Try to limit these to the implementation code-base (i.e.: `gpu/opengl/`).
  * Only add workarounds here if they are common to all implementation or
  * if you need access to it outside of the GPU module.
- * Same goes for capabilities (i.e.: texture size)
+ * Same goes for capabilities (i.e.: texture size).
  */
 struct GPUCapabilities {
   int max_texture_size = 0;
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
index 3113a82b4d1..390d8034337 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
@@ -172,8 +172,8 @@ class OBJMesh : NonCopyable {
    */
   float3 calc_poly_normal(int poly_index) const;
   /**
-   * Find the unqique normals of the mesh and return them in \a r_normal_coords.
-   * Store the indices into that vector with for each loop in this OBJMesh.
+   * Find the unique normals of the mesh and return them in \a r_normal_coords.
+   * Store the indices into that vector with for each loop in this #OBJMesh.
    */
   void store_normal_coords_and_indices(Vector<float3> &r_normal_coords);
   /**
diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
index 1890b349fd1..92d478c20a1 100644
--- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
+++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
@@ -29,7 +29,7 @@
 #include "obj_exporter_tests.hh"
 
 namespace blender::io::obj {
-/* Set this true to keep comparison-failing test ouput in temp file directory. */
+/* Set this true to keep comparison-failing test output in temp file directory. */
 constexpr bool save_failing_test_output = false;
 
 /* This is also the test name. */



More information about the Bf-blender-cvs mailing list