[Bf-blender-cvs] [3bc406274b1] master: Cleanup: comments

Campbell Barton noreply at git.blender.org
Sat Mar 6 09:33:28 CET 2021


Commit: 3bc406274b17c6232c0ba5f86d9be7f3449aa804
Author: Campbell Barton
Date:   Sat Mar 6 13:03:30 2021 +1100
Branches: master
https://developer.blender.org/rB3bc406274b17c6232c0ba5f86d9be7f3449aa804

Cleanup: comments

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

M	source/blender/blenkernel/intern/attribute_access.cc
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/editors/space_outliner/tree/tree_element_id.hh
M	source/blender/python/intern/bpy_rna.c
M	source/blender/windowmanager/intern/wm_platform_support.c
M	source/creator/creator_args.c

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

diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 8348851741f..61dc0903cc8 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -1380,9 +1380,9 @@ static void update_vertex_normals_when_dirty(const GeometryComponent &component)
     return;
   }
 
-  /* Since normals are derived data, const write access to them is okay. However, ensure that
+  /* Since normals are derived data, `const` write access to them is okay. However, ensure that
    * two threads don't use write normals to a mesh at the same time. Note that this relies on
-   * the idempotence of the operation; calculating the normals just fills the MVert struct
+   * the idempotence of the operation; calculating the normals just fills the #MVert struct
    * rather than allocating new memory. */
   if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) {
     ThreadMutex *mesh_eval_mutex = (ThreadMutex *)mesh->runtime.eval_mutex;
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ef2e196094e..1ecaee10e6a 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3684,7 +3684,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
   if (!MAIN_VERSION_ATLEAST(bmain, 280, 48)) {
     for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
       /* Those are not currently used, but are accessible through RNA API and were not
-       * properly initialized previously. This is mere copy of BKE_init_scene() code. */
+       * properly initialized previously. This is mere copy of #scene_init_data code. */
       if (scene->r.im_format.view_settings.look[0] == '\0') {
         BKE_color_managed_display_settings_init(&scene->r.im_format.display_settings);
         BKE_color_managed_view_settings_init_render(
diff --git a/source/blender/editors/space_outliner/tree/tree_element_id.hh b/source/blender/editors/space_outliner/tree/tree_element_id.hh
index d1e672ed387..612c1cd4a6f 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_id.hh
+++ b/source/blender/editors/space_outliner/tree/tree_element_id.hh
@@ -32,7 +32,7 @@ class TreeElementID : public AbstractTreeElement {
 
   /**
    * Expanding not implemented for all types yet. Once it is, this can be set to true or
-   * `AbstractTreeElement::expandValid()` can be removed alltogether.
+   * `AbstractTreeElement::expandValid()` can be removed altogether.
    */
   bool isExpandValid() const override
   {
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index cdf121a6864..ecaa5791e38 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -4598,13 +4598,12 @@ static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject
 #else
   {
     /* Could just do this except for 1 awkward case.
-     * PyObject_GenericGetAttr((PyObject *)self, pyname);
-     * so as to support 'bpy.data.library.load()'
-     * note, this _only_ supports static methods */
+     * `PyObject_GenericGetAttr((PyObject *)self, pyname);`
+     * so as to support `bpy.data.library.load()` */
 
     PyObject *ret = PyObject_GenericGetAttr((PyObject *)self, pyname);
 
-    if (ret == NULL && name[0] != '_') { /* Avoid inheriting __call__ and similar. */
+    if (ret == NULL && name[0] != '_') { /* Avoid inheriting `__call__` and similar. */
       /* Since this is least common case, handle it last. */
       PointerRNA r_ptr;
       if (RNA_property_collection_type_get(&self->ptr, self->prop, &r_ptr)) {
diff --git a/source/blender/windowmanager/intern/wm_platform_support.c b/source/blender/windowmanager/intern/wm_platform_support.c
index 65e1cd45e02..45618e9d6d3 100644
--- a/source/blender/windowmanager/intern/wm_platform_support.c
+++ b/source/blender/windowmanager/intern/wm_platform_support.c
@@ -43,7 +43,9 @@
 
 #define WM_PLATFORM_SUPPORT_TEXT_SIZE 1024
 
-/* Check if user has already approved the given platform_support_key. */
+/**
+ * Check if user has already approved the given `platform_support_key`.
+ */
 static bool wm_platform_support_check_approval(const char *platform_support_key, bool update)
 {
   const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
@@ -120,11 +122,11 @@ bool WM_platform_support_perform_checks()
   eGPUSupportLevel support_level = GPU_platform_support_level();
   const char *platform_key = GPU_platform_support_level_key();
 
-  /* check if previous check matches the current check. Don't update the approval when running in
-   * `background`. this could have been triggered by installing addons via installers.  */
+  /* Check if previous check matches the current check. Don't update the approval when running in
+   * `background`. this could have been triggered by installing add-ons via installers.  */
   if (support_level != GPU_SUPPORT_LEVEL_UNSUPPORTED && !G.factory_startup &&
       wm_platform_support_check_approval(platform_key, !G.background)) {
-    /* if it matches the user has confirmed and whishes to use it */
+    /* If it matches the user has confirmed and wishes to use it. */
     return result;
   }
 
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index e35fce3160f..0e0d66d40a9 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -1149,7 +1149,7 @@ static const char arg_handle_env_system_set_doc_python[] =
 
 static int arg_handle_env_system_set(int argc, const char **argv, void *UNUSED(data))
 {
-  /* "--env-system-scripts" --> "BLENDER_SYSTEM_SCRIPTS" */
+  /* `--env-system-scripts` -> `BLENDER_SYSTEM_SCRIPTS` */
 
   char env[64] = "BLENDER";
   char *ch_dst = env + 7;           /* skip BLENDER */



More information about the Bf-blender-cvs mailing list