[Bf-blender-cvs] [84f048fda56] master: Cleanup: use C style comments for descriptive text

Campbell Barton noreply at git.blender.org
Thu Aug 26 04:47:33 CEST 2021


Commit: 84f048fda566c2098ec1baa2ff1ad6c00b7395d5
Author: Campbell Barton
Date:   Thu Aug 26 12:27:17 2021 +1000
Branches: master
https://developer.blender.org/rB84f048fda566c2098ec1baa2ff1ad6c00b7395d5

Cleanup: use C style comments for descriptive text

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

M	source/blender/blenkernel/BKE_sound.h
M	source/blender/blenkernel/intern/displist.cc
M	source/blender/blenkernel/intern/fluid.c
M	source/blender/blenkernel/intern/gpencil_curve.c
M	source/blender/blenkernel/intern/nla.c
M	source/blender/blenkernel/intern/particle_system.c
M	source/blender/blentranslation/msgfmt/msgfmt.c
M	source/blender/compositor/intern/COM_ExecutionGroup.cc
M	source/blender/compositor/intern/COM_WorkPackage.h
M	source/blender/compositor/nodes/COM_BokehBlurNode.cc
M	source/blender/compositor/nodes/COM_ColorSpillNode.cc
M	source/blender/compositor/nodes/COM_Stabilize2dNode.cc
M	source/blender/compositor/operations/COM_ColorCurveOperation.cc
M	source/blender/compositor/operations/COM_ColorSpillOperation.cc
M	source/blender/compositor/operations/COM_CompositorOperation.cc
M	source/blender/compositor/operations/COM_DilateErodeOperation.cc
M	source/blender/compositor/operations/COM_GlareFogGlowOperation.cc
M	source/blender/compositor/operations/COM_InpaintOperation.cc
M	source/blender/compositor/operations/COM_ScaleOperation.cc
M	source/blender/compositor/operations/COM_SplitOperation.cc
M	source/blender/compositor/operations/COM_VectorBlurOperation.cc
M	source/blender/compositor/operations/COM_ViewerOperation.cc
M	source/blender/compositor/operations/COM_WriteBufferOperation.cc
M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc
M	source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
M	source/blender/depsgraph/intern/debug/deg_time_average.h
M	source/blender/depsgraph/intern/depsgraph_query_iter.cc
M	source/blender/depsgraph/intern/depsgraph_registry.cc
M	source/blender/depsgraph/intern/node/deg_node_component.cc
M	source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
M	source/blender/editors/space_graph/graph_view.c
M	source/blender/imbuf/intern/iris.c
M	source/blender/io/alembic/tests/abc_matrix_test.cc
M	source/blender/makesdna/DNA_action_types.h
M	source/blender/makesdna/DNA_armature_types.h
M	source/blender/makesdna/DNA_constraint_types.h

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

diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 4b257b3b8ab..fa58813c5f8 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -61,8 +61,7 @@ struct bSound *BKE_sound_new_file_exists_ex(struct Main *bmain,
                                             bool *r_exists);
 struct bSound *BKE_sound_new_file_exists(struct Main *bmain, const char *filepath);
 
-// XXX unused currently
-#if 0
+#if 0 /* UNUSED */
 struct bSound *BKE_sound_new_buffer(struct Main *bmain, struct bSound *source);
 
 struct bSound *BKE_sound_new_limiter(struct Main *bmain,
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc
index c97e07ad487..58509e95de6 100644
--- a/source/blender/blenkernel/intern/displist.cc
+++ b/source/blender/blenkernel/intern/displist.cc
@@ -56,7 +56,7 @@
 #include "BKE_modifier.h"
 #include "BKE_object.h"
 
-#include "BLI_sys_types.h"  // for intptr_t support
+#include "BLI_sys_types.h" /* For #intptr_t support. */
 
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_query.h"
@@ -655,7 +655,7 @@ static float displist_calc_taper(Depsgraph *depsgraph,
           return fp[1];
         }
       }
-      return fp[-2];  // last y coord
+      return fp[-2]; /* Last y coordinate. */
     }
   }
 
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 799d6553682..87c1f99fd73 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -557,7 +557,7 @@ static bool BKE_fluid_modifier_init(
   return false;
 }
 
-// forward declaration
+/* Forward declarations. */
 static void manta_smoke_calc_transparency(FluidDomainSettings *fds, ViewLayer *view_layer);
 static float calc_voxel_transp(
     float *result, const float *input, int res[3], int *pixel, float *t_ray, float correct);
@@ -4380,10 +4380,10 @@ static void manta_smoke_calc_transparency(FluidDomainSettings *fds, ViewLayer *v
   light[2] = (light[2] - fds->p0[2]) / fds->cell_size[2] - 0.5f - (float)fds->res_min[2];
 
   /* Calculate domain bounds in sim cell space. */
-  // 0,2,4 = 0.0f
-  bv[1] = (float)fds->res[0];  // x
-  bv[3] = (float)fds->res[1];  // y
-  bv[5] = (float)fds->res[2];  // z
+  /* 0,2,4 = 0.0f */
+  bv[1] = (float)fds->res[0]; /* X */
+  bv[3] = (float)fds->res[1]; /* Y */
+  bv[5] = (float)fds->res[2]; /* Z */
 
   for (int z = 0; z < fds->res[2]; z++) {
     size_t index = z * slabsize;
diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index 344be7bc0f5..0752424df71 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -883,7 +883,7 @@ static void gpencil_interpolate_fl_from_to(
   float *r = point_offset;
   for (int i = 0; i <= it; i++) {
     float fac = (float)i / (float)it;
-    fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;  // smooth
+    fac = 3.0f * fac * fac - 2.0f * fac * fac * fac; /* Smooth. */
     *r = interpf(to, from, fac);
     r = POINTER_OFFSET(r, stride);
   }
@@ -896,7 +896,7 @@ static void gpencil_interpolate_v4_from_to(
   float *r = point_offset;
   for (int i = 0; i <= it; i++) {
     float fac = (float)i / (float)it;
-    fac = 3.0f * fac * fac - 2.0f * fac * fac * fac;  // smooth
+    fac = 3.0f * fac * fac - 2.0f * fac * fac * fac; /* Smooth. */
     interp_v4_v4v4(r, from, to, fac);
     r = POINTER_OFFSET(r, stride);
   }
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 7e524da0f53..7ea0d991f4c 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -269,7 +269,7 @@ void BKE_nla_tracks_copy(Main *bmain, ListBase *dst, const ListBase *src, const
   /* copy each NLA-track, one at a time */
   for (nlt = src->first; nlt; nlt = nlt->next) {
     /* make a copy, and add the copy to the destination list */
-    // XXX: we need to fix this sometime
+    /* XXX: we need to fix this sometime. */
     nlt_d = BKE_nlatrack_copy(bmain, nlt, true, flag);
     BLI_addtail(dst, nlt_d);
   }
@@ -516,7 +516,7 @@ static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short
   if (IS_EQF(strip->repeat, 0.0f)) {
     strip->repeat = 1.0f;
   }
-  // repeat = strip->repeat; // UNUSED
+  // repeat = strip->repeat; /* UNUSED */
 
   /* scaling */
   if (IS_EQF(strip->scale, 0.0f)) {
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 60edb78f8ba..8986847a034 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1638,10 +1638,10 @@ static void sph_springs_modify(ParticleSystem *psys, float dtime)
     Lij = spring->rest_length;
     d = yield_ratio * timefix * Lij;
 
-    if (rij > Lij + d) {  // Stretch
+    if (rij > Lij + d) { /* Stretch */
       spring->rest_length += plasticity * (rij - Lij - d) * timefix;
     }
-    else if (rij < Lij - d) {  // Compress
+    else if (rij < Lij - d) { /* Compress */
       spring->rest_length -= plasticity * (Lij - d - rij) * timefix;
     }
 
@@ -2209,7 +2209,7 @@ static void sph_integrate(ParticleSimulationData *sim,
                           SPHData *sphdata)
 {
   ParticleSettings *part = sim->psys->part;
-  // float timestep = psys_get_timestep(sim); // UNUSED
+  // float timestep = psys_get_timestep(sim); /* UNUSED */
   float pa_mass = part->mass * ((part->flag & PART_SIZEMASS) ? pa->size : 1.0f);
   float dtime = dfra * psys_get_timestep(sim);
   // int steps = 1; // UNUSED
@@ -2218,7 +2218,7 @@ static void sph_integrate(ParticleSimulationData *sim,
   sphdata->pa = pa;
   sphdata->mass = pa_mass;
   sphdata->pass = 0;
-  // sphdata.element_size and sphdata.flow are set in the callback.
+  /* #sphdata.element_size and #sphdata.flow are set in the callback. */
 
   /* Restore previous state and treat gravity & effectors as external acceleration. */
   sub_v3_v3v3(effector_acceleration, pa->state.vel, pa->prev_state.vel);
diff --git a/source/blender/blentranslation/msgfmt/msgfmt.c b/source/blender/blentranslation/msgfmt/msgfmt.c
index f95bf2a9037..05c71fd4852 100644
--- a/source/blender/blentranslation/msgfmt/msgfmt.c
+++ b/source/blender/blentranslation/msgfmt/msgfmt.c
@@ -382,7 +382,7 @@ static int make(const char *input_file_name, const char *output_file_name)
     }
     else if (strstr(l, msgstr_kw) == l) {
       l = l + msgstr_len;
-      // Now we are in a msgstr section
+      /* Now we are in a `msgstr` section. */
       section = SECTION_STR;
       if (l[0] == '[') {
         if (!is_plural) {
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cc b/source/blender/compositor/intern/COM_ExecutionGroup.cc
index 68bda8c70d6..a45c453d7ed 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cc
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cc
@@ -561,7 +561,7 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph,
     return true;
   }
 
-  // Check if chunk is already executed or scheduled and not yet executed.
+  /* Check if chunk is already executed or scheduled and not yet executed. */
   const int chunk_index = chunk_y * this->m_x_chunks_len + chunk_x;
   WorkPackage &work_package = m_work_packages[chunk_index];
   if (work_package.state == eWorkPackageState::Executed) {
diff --git a/source/blender/compositor/intern/COM_WorkPackage.h b/source/blender/compositor/intern/COM_WorkPackage.h
index f0f53f300a5..20fca89aa4c 100644
--- a/source/blender/compositor/intern/COM_WorkPackage.h
+++ b/source/blender/compositor/intern/COM_WorkPackage.h
@@ -30,7 +30,7 @@
 #include <ostream>
 
 namespace blender::compositor {
-// Forward Declarations.
+/* Forward Declarations. */
 class ExecutionGroup;
 
 /**
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.cc b/source/blender/compositor/nodes/COM_BokehBlurNode.cc
index 1d2a0dae390..c51a98c0f82 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.cc
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.cc
@@ -64,9 +64,8 @@ void BokehBlurNode::convertToOperations(NodeConverter &converter,
     converter.mapInputSocket(getInputSocket(0), operation->getInputSocket(0));
     converter.mapInputSocket(getInputSocket(1), operation->getInputSocket(1));
 
-    // NOTE: on the bokeh blur operation the sockets are switched.
-    // for this reason the next two lines are correct.
-    // Fix for T43771
+    /* NOTE: on the bokeh blur operation the sockets are switched.
+     * for this reason the next two lines are correct. Fix for T43771. */
     converter.mapInputSocket(getInputSocket(2), operation->getInputSocket(3));
     converter.mapInputSocket(getInputSocket(3), operation->getInputSocket(2));
 
diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.cc b/source/blender/compositor/nodes/COM_ColorSpillNode.cc
index 119cff93e84..6119e635e59 100644
--- a/source/blender/compositor/nodes/COM_ColorSpillNode.cc
+++ b/source/blender/compositor/nodes/COM_ColorSpillNode.cc
@@ -39,8 +39,8 @@ void ColorSpillNode::convertToOperations(NodeConverter &converter,
   ColorSpillOperation *operation;
   operation = new ColorSpillOperation();
   operation->setSettings((NodeColorspill *)editorsnode->storage);
-  operation->setSpillChannel(editorsnode->custom1 - 1);  // Channel for spilling
-  operation->setSpillMethod(editorsnode->custom2);       // Channel method
+  operation->setSpillChannel(editorsnode->custom1 - 1); /* Channel for spilling */
+  operation->setSpillMethod(editorsnode->custom2);      /* Channel method */
   converter.addOperation(operation);
 
   converter.mapInputSocket(inputSocketImage, operation->getInputSocket(0));
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.cc b/source/blender/compositor/nodes/COM_Stabilize2dNode.cc
index 7b2388bebca..90f62c6d562 100644
--- a/source/blender/compositor/nodes/COM_Stabilize2dNode.cc
+++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.cc
@@ -101,7 +101,7 @@ void Stabilize2dNode::convertToOperations(NodeConverter &converter,
     

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list