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

Campbell Barton noreply at git.blender.org
Tue Jan 18 05:05:18 CET 2022


Commit: db496a0b7dcf1ab024aece9858257c40529138e4
Author: Campbell Barton
Date:   Tue Jan 18 14:27:29 2022 +1100
Branches: master
https://developer.blender.org/rBdb496a0b7dcf1ab024aece9858257c40529138e4

Cleanup: spelling in comments

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

M	source/blender/blenkernel/intern/lib_remap_test.cc
M	source/blender/blenlib/tests/BLI_any_test.cc
M	source/blender/blenloader/intern/versioning_250.c
M	source/blender/blenloader/intern/versioning_userdef.c
M	source/blender/editors/screen/glutil.c
M	source/blender/gpu/intern/gpu_shader_create_info.cc
M	source/blender/gpu/intern/gpu_shader_create_info.hh
M	source/blender/gpu/intern/gpu_shader_create_info_private.hh
M	source/blender/gpu/intern/gpu_shader_dependency.cc
M	source/blender/gpu/intern/gpu_shader_shared_utils.h
M	source/blender/makesrna/intern/rna_fcurve.c
M	source/blender/render/intern/texture_margin.cc

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

diff --git a/source/blender/blenkernel/intern/lib_remap_test.cc b/source/blender/blenkernel/intern/lib_remap_test.cc
index f803e600787..2faf9265ea6 100644
--- a/source/blender/blenkernel/intern/lib_remap_test.cc
+++ b/source/blender/blenkernel/intern/lib_remap_test.cc
@@ -227,7 +227,7 @@ TEST(lib_remap, delete_when_remap_to_self_not_allowed)
 /** \} */
 
 /* -------------------------------------------------------------------- */
-/** \name Userref counting
+/** \name User Reference Counting
  * \{ */
 
 TEST(lib_remap, users_are_decreased_when_not_skipping_never_null)
diff --git a/source/blender/blenlib/tests/BLI_any_test.cc b/source/blender/blenlib/tests/BLI_any_test.cc
index 3a5cbee6d72..dc72affd610 100644
--- a/source/blender/blenlib/tests/BLI_any_test.cc
+++ b/source/blender/blenlib/tests/BLI_any_test.cc
@@ -54,7 +54,7 @@ TEST(any, AssignMap)
 
   Any<> c = std::move(a);
   /* Test valid state after self assignment. Clang emits `-Wself-assign-overloaded` with `c=c;`.
-   * And pragma suppression creates warnings on other compilers. */
+   * And `pragma` suppression creates warnings on other compilers. */
   c = static_cast<decltype(a) &>(c);
   EXPECT_TRUE(c);
   EXPECT_EQ((c.get<Map<int, int>>().lookup(4)), 2);
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index bee8bb757e4..52737950ea3 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -856,10 +856,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
       if (!ts->uv_selectmode || ts->vgroup_weight == 0.0f) {
         ts->selectmode = SCE_SELECT_VERTEX;
 
-        /* autokeying - setting should be taken from the user-prefs
-         * but the userprefs version may not have correct flags set
-         * (i.e. will result in blank box when enabled)
-         */
+        /* The auto-keying setting should be taken from the user-preferences
+         * but the user-preferences version may not have correct flags set
+         * (i.e. will result in blank box when enabled). */
         ts->autokey_mode = U.autokey_mode;
         if (ts->autokey_mode == 0) {
           ts->autokey_mode = 2; /* 'add/replace' but not on */
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 3338d2f658c..064d7977c68 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -569,8 +569,8 @@ void blo_do_versions_userdef(UserDef *userdef)
   }
 
   if (!USER_VERSION_ATLEAST(257, 0)) {
-    /* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs,
-     * so that it doesn't linger around from old configs like a ghost */
+    /* Clear #AUTOKEY_FLAG_ONLYKEYINGSET flag from user-preferences,
+     * so that it doesn't linger around from old configurations like a ghost. */
     userdef->autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
   }
 
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 03e817c467d..63b7fbc14a7 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -89,9 +89,9 @@ void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state,
   static const float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
   const float draw_width = img_w * scaleX * xzoom;
   const float draw_height = img_h * scaleY * yzoom;
-  /* Downscaling with regular bilinear interpolation (i.e. #GL_LINEAR) doesn't give good filtering
-   * results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR), so always
-   * use mipmaps when filtering. */
+  /* Down-scaling with regular bi-linear interpolation (i.e. #GL_LINEAR) doesn't give good
+   * filtering results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR),
+   * so always use mipmaps when filtering. */
   const bool use_mipmap = use_filter && ((draw_width < img_w) || (draw_height < img_h));
 
   GPUTexture *tex = GPU_texture_create_2d("immDrawPixels", img_w, img_h, 1, gpu_format, NULL);
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc
index e4e5034026f..3d4f27d2278 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.cc
+++ b/source/blender/gpu/intern/gpu_shader_create_info.cc
@@ -20,7 +20,7 @@
 /** \file
  * \ingroup gpu
  *
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
  */
 
 #include "BLI_map.hh"
@@ -165,7 +165,7 @@ bool gpu_shader_create_info_compile_all()
   return true;
 }
 
-/* Runtime create infos are not registered in the dictionnary and cannot be searched. */
+/* Runtime create infos are not registered in the dictionary and cannot be searched. */
 const GPUShaderCreateInfo *gpu_shader_create_info_get(const char *info_name)
 {
   ShaderCreateInfo *info = g_create_infos->lookup(info_name);
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh
index ced7f7039e7..b4bd58630d5 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.hh
+++ b/source/blender/gpu/intern/gpu_shader_create_info.hh
@@ -20,7 +20,7 @@
 /** \file
  * \ingroup gpu
  *
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
  *
  * Some rule of thumb:
  * - Do not include anything else than this file in each info file.
@@ -214,9 +214,9 @@ struct StageInterfaceInfo {
 struct ShaderCreateInfo {
   /** Shader name for debugging. */
   StringRefNull name_;
-  /** True if the shader is static and can be precompiled at compile time. */
+  /** True if the shader is static and can be pre-compiled at compile time. */
   bool do_static_compilation_ = false;
-  /** If true, all additionaly linked create info will be merged into this one. */
+  /** If true, all additionally linked create info will be merged into this one. */
   bool finalized_ = false;
   /**
    * Maximum length of all the resource names including each null terminator.
@@ -297,7 +297,7 @@ struct ShaderCreateInfo {
   };
   /**
    * Resources are grouped by frequency of change.
-   * Pass resources are meants to be valid for the whole pass.
+   * Pass resources are meant to be valid for the whole pass.
    * Batch resources can be changed in a more granular manner (per object/material).
    * Mis-usage will only produce suboptimal performance.
    */
diff --git a/source/blender/gpu/intern/gpu_shader_create_info_private.hh b/source/blender/gpu/intern/gpu_shader_create_info_private.hh
index 7010fa5e3a2..6d2878377ad 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_create_info_private.hh
@@ -20,7 +20,7 @@
 /** \file
  * \ingroup gpu
  *
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
  *
  * Some rule of thumb:
  * - Do not include anything else than this file in each descriptor file.
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index a866e9f1fda..2d56e1cec05 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -140,7 +140,7 @@ struct GPUSource {
     };
   }
 
-  /* Returns the final string with all inlcudes done. */
+  /* Returns the final string with all includes done. */
   void build(std::string &str, shader::BuiltinBits &out_builtins)
   {
     for (auto *dep : dependencies) {
diff --git a/source/blender/gpu/intern/gpu_shader_shared_utils.h b/source/blender/gpu/intern/gpu_shader_shared_utils.h
index 1097547e5ae..f061f0f968a 100644
--- a/source/blender/gpu/intern/gpu_shader_shared_utils.h
+++ b/source/blender/gpu/intern/gpu_shader_shared_utils.h
@@ -24,16 +24,16 @@
  * We use the same vector and matrix types as Blender C++. Some math functions are defined to use
  * the float version to match the GLSL syntax.
  * This file can be used for C & C++ code and the syntax used should follow the same rules.
- * Some preprocessing is done by the GPU backend to make it GLSL compatible.
+ * Some preprocessing is done by the GPU back-end to make it GLSL compatible.
  *
  * IMPORTANT:
- * - Don't add trailing comma at the end of the enum. Our custom pre-processor will noy trim it
+ * - Don't add trailing comma at the end of the enum. Our custom pre-processor will now trim it
  *   for GLSL.
  * - Always use `u` suffix for enum values. GLSL do not support implicit cast.
  * - Define all values. This is in order to simplify custom pre-processor code.
  * - Always use uint32_t as underlying type.
  * - Use float suffix by default for float literals to avoid double promotion in C++.
- * - Pack one float or int after a vec3/ivec3 to fullfil alligment rules.
+ * - Pack one float or int after a vec3/ivec3 to fulfill alignment rules.
  *
  * NOTE: Due to alignment restriction and buggy drivers, do not try to use mat3 inside structs.
  * NOTE: (UBO only) Do not use arrays of float. They are padded to arrays of vec4 and are not worth
@@ -81,7 +81,6 @@
 
 #  ifdef __cplusplus
 #    include "BLI_float4x4.hh"
-#    include "BLI_float4x4.hh"
 #  else
 typedef float float2[2];
 typedef float float3[3];
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index d3175c445a9..0e2b64fbca4 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1014,7 +1014,7 @@ static void rna_FKeyframe_points_add(ID *id, FCurve *fcu, Main *bmain, int tot)
     fcu->totvert += tot;
 
     while (tot--) {
-      /* defaults, no userprefs gives predictable results for API */
+      /* Defaults, ignoring user-preference gives predictable results for API. */
       bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
       bezt->ipo = BEZT_IPO_BEZ;
       bezt->h1 = bezt->h2 = HD_AUTO_ANIM;
diff --git a/

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list