[Bf-blender-cvs] [a22c2ceb0fe] master: Cleanup: line breaks with comments

Campbell Barton noreply at git.blender.org
Thu Sep 12 11:00:41 CEST 2019


Commit: a22c2ceb0feed60942a59f0ebaa26d351b784ed8
Author: Campbell Barton
Date:   Thu Sep 12 18:58:43 2019 +1000
Branches: master
https://developer.blender.org/rBa22c2ceb0feed60942a59f0ebaa26d351b784ed8

Cleanup: line breaks with comments

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

M	source/blender/avi/intern/avi_options.c
M	source/blender/blenkernel/intern/curve.c
M	source/blender/blenkernel/intern/mesh_convert.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/bmesh/intern/bmesh_marking.c
M	source/blender/compositor/intern/COM_WorkScheduler.cpp
M	source/blender/makesrna/intern/makesrna.c
M	source/blender/makesrna/intern/rna_define.c
M	source/blender/modifiers/intern/MOD_shrinkwrap.c
M	source/blender/nodes/texture/nodes/node_texture_proc.c
M	source/blender/windowmanager/intern/wm_operator_type.c

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

diff --git a/source/blender/avi/intern/avi_options.c b/source/blender/avi/intern/avi_options.c
index 4f7e26c874c..65db8c19397 100644
--- a/source/blender/avi/intern/avi_options.c
+++ b/source/blender/avi/intern/avi_options.c
@@ -42,8 +42,8 @@ AviError AVI_set_compress_option(
 
   (void)stream; /* unused */
 
-  if (movie->header->TotalFrames !=
-      0) { /* Can't change params after we have already started writing frames */
+  if (movie->header->TotalFrames != 0) {
+    /* Can't change params after we have already started writing frames. */
     return AVI_ERROR_OPTION;
   }
 
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 5f9a726d34a..0080eb1a9d7 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -2145,8 +2145,8 @@ static void tilt_bezpart(BezTriple *prevbezt,
 
   for (a = 0; a < resolu; a++, fac += dfac) {
     if (tilt_array) {
-      if (nu->tilt_interp ==
-          KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */
+      if (nu->tilt_interp == KEY_CU_EASE) {
+        /* May as well support for tilt also 2.47 ease interp. */
         *tilt_array = prevbezt->tilt +
                       (bezt->tilt - prevbezt->tilt) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
       }
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index e072a37acee..0a991ee36c8 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -265,9 +265,11 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob,
   const float *data;
   int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop = 0, totpoly = 0;
   int p1, p2, p3, p4, *index;
-  const bool conv_polys = ((CU_DO_2DFILL(cu) ==
-                            false) || /* 2d polys are filled with DL_INDEX3 displists */
-                           (ob->type == OB_SURF)); /* surf polys are never filled */
+  const bool conv_polys = (
+      /* 2d polys are filled with DL_INDEX3 displists */
+      (CU_DO_2DFILL(cu) == false) ||
+      /* surf polys are never filled */
+      (ob->type == OB_SURF));
 
   /* count */
   dl = dispbase->first;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e9d4af447e0..c4363813e36 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5339,8 +5339,8 @@ static void lib_link_object(FileData *fd, Main *main)
                                                                            eModifierType_Smoke);
 
         if (smd && (smd->type == MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
-          smd->domain->flags |=
-              MOD_SMOKE_FILE_LOAD; /* flag for refreshing the simulation after loading */
+          /* Flag for refreshing the simulation after loading. */
+          smd->domain->flags |= MOD_SMOKE_FILE_LOAD;
         }
       }
 
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 788edc348d9..58a7d423d67 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -1026,8 +1026,8 @@ bool BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
   ese->next = ese->prev = NULL;
 
   if (ese_last) {
-    if (ese_last->htype ==
-        BM_FACE) { /* if there is an active face, use it over the last selected face */
+    /* If there is an active face, use it over the last selected face. */
+    if (ese_last->htype == BM_FACE) {
       if (efa) {
         ese->ele = (BMElem *)efa;
       }
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 48af823f8f5..5ed2af0c11d 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -239,8 +239,8 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
     g_context = NULL;
     g_program = NULL;
 
-    if (clewInit() !=
-        CLEW_SUCCESS) { /* this will check for errors and skip if already initialized */
+    /* This will check for errors and skip if already initialized. */
+    if (clewInit() != CLEW_SUCCESS) {
       return;
     }
 
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index f531eb7f494..2d4da942610 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -629,8 +629,8 @@ static char *rna_def_property_get_func(
 
       if (prop->type == PROP_FLOAT) {
         if (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
-          if (prop->subtype !=
-              PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+          /* Colors are an exception. these get translated. */
+          if (prop->subtype != PROP_COLOR_GAMMA) {
             CLOG_ERROR(&LOG,
                        "%s.%s is a '%s' but wrapped as type '%s'.",
                        srna->identifier,
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8fc3bee83e6..758fbd07f85 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2445,8 +2445,8 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
     /* silent is for internal use */
     if (DefRNA.silent == 0) {
       if (dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
-        if (prop->subtype !=
-            PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+        /* Colors are an exception. these get translated. */
+        if (prop->subtype != PROP_COLOR_GAMMA) {
           CLOG_ERROR(&LOG,
                      "%s.%s is a '%s' but wrapped as type '%s'.",
                      srna->identifier,
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index 4bca48852a2..b8d0b19b7bf 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -65,8 +65,8 @@ static void requiredDataMask(Object *UNUSED(ob),
 
   if ((smd->shrinkType == MOD_SHRINKWRAP_PROJECT) &&
       (smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)) {
-    r_cddata_masks->vmask |=
-        CD_MASK_MVERT; /* XXX Really? These should always be present, always... */
+    /* XXX Really? These should always be present, always... */
+    r_cddata_masks->vmask |= CD_MASK_MVERT;
   }
 }
 
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index b0b646dfd16..5c3b0dc7f55 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -165,83 +165,84 @@ static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short th
   tex->ns_outscale = tex_input_value(in[I + 4], p, thread);
   tex->noisesize = tex_input_value(in[I + 5], p, thread);
 }
-ProcDef(voronoi)
+ProcDef(voronoi);
 
-    /* --- BLEND -- */
-    static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
-ProcNoInputs(blend) ProcDef(blend)
+/* --- BLEND -- */
+static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
+ProcNoInputs(blend);
+ProcDef(blend);
 
-    /* -- MAGIC -- */
-    static bNodeSocketTemplate magic_inputs[] = {
-        COMMON_INPUTS,
-        {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
-        {-1, 0, ""}};
+/* -- MAGIC -- */
+static bNodeSocketTemplate magic_inputs[] = {
+    COMMON_INPUTS,
+    {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+    {-1, 0, ""}};
 static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
 {
   tex->turbul = tex_input_value(in[I + 0], p, thread);
 }
-ProcDef(magic)
-
-    /* --- MARBLE --- */
-    static bNodeSocketTemplate marble_inputs[] = {
-        COMMON_INPUTS,
-        {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
-        {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
-        {-1, 0, ""}};
+ProcDef(magic);
+
+/* --- MARBLE --- */
+static bNodeSocketTemplate marble_inputs[] = {
+    COMMON_INPUTS,
+    {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+    {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+    {-1, 0, ""}};
 static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
 {
   tex->noisesize = tex_input_value(in[I + 0], p, thread);
   tex->turbul = tex_input_value(in[I + 1], p, thread);
 }
-ProcDef(marble)
+ProcDef(marble);
 
-    /* --- CLOUDS --- */
-    static bNodeSocketTemplate clouds_inputs[] = {
-        COMMON_INPUTS,
-        {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
-        {-1, 0, ""}};
+/* --- CLOUDS --- */
+static bNodeSocketTemplate clouds_inputs[] = {
+    COMMON_INPUTS,
+    {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+    {-1, 0, ""}};
 static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
 {
   tex->noisesize = tex_input_value(in[I + 0], p, thread);
 }
-ProcDef(clouds)
-
-    /* --- DISTORTED NOISE --- */
-    static bNodeSocketTemplate distnoise_inputs[] = {
-        COMMON_INPUTS,
-        {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
-        {SOCK_FLOAT, 1, N_("Distortion"), 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED},
-        {-1, 0, ""}};
+ProcDef(clouds);
+
+/* --- DISTORTED NOISE --- */
+static bNodeSocketTemplate distnoise_inputs[] = {
+    COMMON_INPUTS,
+    {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+    {SOCK_FLOAT, 1, N_("Distortion"), 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED},
+    {-1, 0, ""}};
 static void distnoise_map_inputs(Tex *t

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list