[Bf-blender-cvs] [d718d6b4493] master: Cleanup: Use C style comments for descriptive text

Campbell Barton noreply at git.blender.org
Tue Aug 31 09:14:01 CEST 2021


Commit: d718d6b4493429a1e688e874fd76963f98e3d034
Author: Campbell Barton
Date:   Tue Aug 31 13:36:28 2021 +1000
Branches: master
https://developer.blender.org/rBd718d6b4493429a1e688e874fd76963f98e3d034

Cleanup: Use C style comments for descriptive text

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

M	source/blender/blenkernel/intern/armature_test.cc
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/effect.c
M	source/blender/blenkernel/intern/fluid.c
M	source/blender/blenkernel/intern/fmodifier.c
M	source/blender/blenkernel/intern/freestyle.c
M	source/blender/blenkernel/intern/pbvh_bmesh.c
M	source/blender/blenkernel/intern/text.c
M	source/blender/blenlib/intern/winstuff_dir.c
M	source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
M	source/blender/blenloader/intern/readblenentry.c
M	source/blender/compositor/COM_defines.h
M	source/blender/compositor/intern/COM_ExecutionGroup.cc
M	source/blender/compositor/nodes/COM_GlareNode.cc
M	source/blender/compositor/nodes/COM_KeyingScreenNode.cc
M	source/blender/compositor/nodes/COM_ViewLevelsNode.cc
M	source/blender/compositor/nodes/COM_ZCombineNode.cc
M	source/blender/compositor/operations/COM_BilateralBlurOperation.cc
M	source/blender/compositor/operations/COM_ColorCorrectionOperation.cc
M	source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cc
M	source/blender/compositor/operations/COM_GlareStreaksOperation.cc
M	source/blender/compositor/operations/COM_ScaleOperation.cc
M	source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cc
M	source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
M	source/blender/io/usd/intern/usd_reader_material.cc
M	source/blender/modifiers/intern/MOD_collision.c
M	source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
M	source/blender/render/intern/multires_bake.c

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

diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc
index 99eb064d061..2994563175f 100644
--- a/source/blender/blenkernel/intern/armature_test.cc
+++ b/source/blender/blenkernel/intern/armature_test.cc
@@ -176,9 +176,9 @@ class BKE_armature_find_selected_bones_test : public testing::Test {
     bone2.childbase = {nullptr, nullptr};
     bone3.childbase = {nullptr, nullptr};
 
-    BLI_addtail(&arm.bonebase, &bone1);     // bone1 is root bone
-    BLI_addtail(&arm.bonebase, &bone2);     // bone2 is root bone
-    BLI_addtail(&bone2.childbase, &bone3);  // bone3 has bone2 as parent
+    BLI_addtail(&arm.bonebase, &bone1);    /* bone1 is root bone. */
+    BLI_addtail(&arm.bonebase, &bone2);    /* bone2 is root bone. */
+    BLI_addtail(&bone2.childbase, &bone3); /* bone3 has bone2 as parent. */
 
     /* Make sure the armature & its bones are visible, to make them selectable. */
     arm.layer = bone1.layer = bone2.layer = bone3.layer = 1;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 8f94c407cae..0dc4f64cec1 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3978,7 +3978,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
     total_sample = gaussianTotal;
   }
 
-  /* Supersampling */
+  /* Super-sampling */
   for (ss = 0; ss < samples; ss++) {
     float ray_start[3], ray_dir[3];
     float sample_factor = 0.0f;
@@ -3999,7 +3999,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
     float hitCoord[3];
     int hitTri = -1;
 
-    /* Supersampling factor */
+    /* Super-sampling factor. */
     if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
       sample_factor = gaussianFactors[ss];
     }
@@ -4240,25 +4240,25 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
       numOfHits++;
     }
 
-    /* apply sample strength */
+    /* Apply sample strength. */
     brushStrength += sampleStrength;
-  }  // end supersampling
+  } /* End super-sampling. */
 
-  /* if any sample was inside paint range */
+  /* If any sample was inside paint range. */
   if (brushStrength > 0.0f || depth > 0.0f) {
-    /* apply supersampling results */
+    /* Apply super-sampling results. */
     if (samples > 1) {
       brushStrength /= total_sample;
     }
     CLAMP(brushStrength, 0.0f, 1.0f);
 
     if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
-      /* Get final pixel color and alpha */
+      /* Get final pixel color and alpha. */
       paintColor[0] /= numOfHits;
       paintColor[1] /= numOfHits;
       paintColor[2] /= numOfHits;
     }
-    /* get final object space depth */
+    /* Get final object space depth. */
     else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) {
       depth /= bData->bNormal[index].normal_scale * total_sample;
     }
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 334118ddf3f..a88339082fe 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -481,7 +481,9 @@ static void eff_tri_ray_hit(void *UNUSED(userData),
   hit->index = 1;
 }
 
-// get visibility of a wind ray
+/**
+ * Get visibility of a wind ray.
+ */
 static float eff_calc_visibility(ListBase *colliders,
                                  EffectorCache *eff,
                                  EffectorData *efd,
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 87c1f99fd73..5a5e1208ff0 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1580,7 +1580,7 @@ static void emit_from_particles(Object *flow_ob,
 
     /* initialize particle cache */
     if (psys->part->type == PART_HAIR) {
-      // TODO: PART_HAIR not supported whatsoever
+      /* TODO: PART_HAIR not supported whatsoever. */
       totchild = 0;
     }
     else {
@@ -1674,9 +1674,9 @@ static void emit_from_particles(Object *flow_ob,
         if (ffs->flags & FLUID_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO)) {
           madd_v3_v3fl(&bb->velocity[index * 3], &particle_vel[p * 3], ffs->vel_multi);
         }
-      }  // particles loop
+      } /* particles loop */
     }
-    else if (valid_particles > 0) {  // FLUID_FLOW_USE_PART_SIZE
+    else if (valid_particles > 0) { /* #FLUID_FLOW_USE_PART_SIZE */
       int min[3], max[3], res[3];
 
       /* setup loop bounds */
@@ -3171,7 +3171,7 @@ static void update_effectors_task_cb(void *__restrict userdata,
       if ((data->fuel && MAX2(data->density[index], data->fuel[index]) < FLT_EPSILON) ||
           (data->density && data->density[index] < FLT_EPSILON) ||
           (data->phi_obs_in && data->phi_obs_in[index] < 0.0f) ||
-          data->flags[index] & 2)  // mantaflow convention: 2 == FlagObstacle
+          data->flags[index] & 2) /* Manta-flow convention: `2 == FlagObstacle`. */
       {
         continue;
       }
@@ -4253,7 +4253,7 @@ static float calc_voxel_transp(
 {
   const size_t index = manta_get_index(pixel[0], res[0], pixel[1], res[1], pixel[2]);
 
-  // T_ray *= T_vox
+  /* `T_ray *= T_vox`. */
   *t_ray *= expf(input[index] * correct);
 
   if (result[index] < 0.0f) {
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 641c003d456..5aa3815729f 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -580,7 +580,7 @@ int BKE_fcm_envelope_find_index(FCM_EnvelopeData array[],
   if (loopbreaker == (maxloop - 1)) {
     CLOG_ERROR(&LOG, "binary search was taking too long");
 
-    // include debug info
+    /* Include debug info. */
     CLOG_ERROR(&LOG,
                "\tround = %d: start = %d, end = %d, arraylen = %d",
                loopbreaker,
diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c
index aa3b4f1ef5e..d9b3faf8623 100644
--- a/source/blender/blenkernel/intern/freestyle.c
+++ b/source/blender/blenkernel/intern/freestyle.c
@@ -34,7 +34,7 @@
 #include "BKE_lib_id.h"
 #include "BKE_linestyle.h"
 
-// function declarations
+/* Function declarations. */
 static FreestyleLineSet *alloc_lineset(void);
 static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *lineset, const int flag);
 static FreestyleModuleConfig *alloc_module(void);
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 93cffcf7164..c30f94a4cf6 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -914,7 +914,7 @@ static void long_edge_queue_edge_add_recursive(
       for (int i = 0; i < ARRAY_SIZE(l_adjacent); i++) {
         float len_sq_other = BM_edge_calc_length_squared(l_adjacent[i]->e);
         if (len_sq_other > max_ff(len_sq_cmp, limit_len_sq)) {
-          //                  edge_queue_insert(eq_ctx, l_adjacent[i]->e, -len_sq_other);
+          // edge_queue_insert(eq_ctx, l_adjacent[i]->e, -len_sq_other);
           long_edge_queue_edge_add_recursive(
               eq_ctx, l_adjacent[i]->radial_next, l_adjacent[i], len_sq_other, limit_len);
         }
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 6b7b3213a83..f67bf68010d 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -342,9 +342,9 @@ int txt_extended_ascii_as_utf8(char **str)
   return added;
 }
 
-// this function removes any control characters from
-// a textline and fixes invalid utf-8 sequences
-
+/**
+ * Removes any control characters from a text-line and fixes invalid UTF8 sequences.
+ */
 static void cleanup_textline(TextLine *tl)
 {
   int i;
diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.c
index 2dc41bfc54c..6f99ea075bb 100644
--- a/source/blender/blenlib/intern/winstuff_dir.c
+++ b/source/blender/blenlib/intern/winstuff_dir.c
@@ -24,7 +24,7 @@
 
 #ifdef WIN32
 
-/* standalone for inclusion in binaries other than blender */
+/* Standalone for inclusion in binaries other than Blender. */
 #  ifdef USE_STANDALONE
 #    define MEM_mallocN(size, str) ((void)str, malloc(size))
 #    define MEM_callocN(size, str) ((void)str, calloc(size, 1))
@@ -33,7 +33,7 @@
 #    include "MEM_guardedalloc.h"
 #  endif
 
-#  define WIN32_SKIP_HKEY_PROTECTION  // need to use HKEY
+#  define WIN32_SKIP_HKEY_PROTECTION /* Need to use `HKEY`. */
 #  include "BLI_utildefines.h"
 #  include "BLI_winstuff.h"
 #  include "utfconv.h"
diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
index f221036419e..70e3a99e57a 100644
--- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
@@ -1842,7 +1842,7 @@ void text_test(
   std::copy(b_before_arcs_in.vert.begin(), b_before_arcs_in.vert.end(), b_vert.begin());
   std::copy(b_before_arcs_in.face.begin(), b_before_arcs_in.face.end(), b_face.begin());
   if (num_arc_points > 0) {
-    b_face[0].pop_last();  // We'll add center point back between arcs for outer face.
+    b_face[0].pop_last(); /* We'll add center point back between arcs for outer face. */
     for (int arc = 0; arc < narcs; ++arc) {
       int arc_origin_vert;
       int arc_terminal_vert;
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index f67ff0f7ac7..f88b470809c 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -50,7 +50,7 @@
 
 #include "readfile.h"
 
-#include "BLI_sys_types.h"  // needed for intptr_t
+#include "BLI_sys_types.h" /* Needed for `intptr_t`. */
 
 #ifdef WIN32
 #  include "BLI_winstuff.h"
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index e270eeb3386..73c4343a230 100644
--- a/source/blender/compositor/COM_defines.h
++

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list