[Bf-blender-cvs] [13450c2d22c] master: Cleanup: Clang format

Hans Goudey noreply at git.blender.org
Tue Jan 10 05:32:07 CET 2023


Commit: 13450c2d22cd1bbe05850b96670fbdec74bad9c8
Author: Hans Goudey
Date:   Mon Jan 9 23:26:32 2023 -0500
Branches: master
https://developer.blender.org/rB13450c2d22cd1bbe05850b96670fbdec74bad9c8

Cleanup: Clang format

Mostly bad white space from a bad find & replace in my own cleanup commit.

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

M	source/blender/blenkernel/intern/curve.cc
M	source/blender/blenkernel/intern/scene.cc
M	source/blender/editors/interface/interface_handlers.cc
M	source/blender/editors/space_image/image_undo.cc
M	source/blender/editors/space_node/node_gizmo.cc
M	source/blender/editors/transform/transform_convert_node.cc
M	source/blender/geometry/intern/mesh_merge_by_distance.cc
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc
M	source/blender/render/intern/multires_bake.cc
M	source/blender/windowmanager/intern/wm_event_system.cc

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

diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc
index f2e6d037fe0..139d4a45553 100644
--- a/source/blender/blenkernel/intern/curve.cc
+++ b/source/blender/blenkernel/intern/curve.cc
@@ -3048,7 +3048,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_
           bevp2 = bevp1 + (bl->nr - 1);
           nr = bl->nr / 2;
           while (nr--) {
-            std::swap( *bevp1, *bevp2);
+            std::swap(*bevp1, *bevp2);
             bevp1++;
             bevp2--;
           }
@@ -4446,12 +4446,12 @@ void BKE_nurb_direction_switch(Nurb *nu)
         swap_v3_v3(bezt2->vec[0], bezt2->vec[2]);
       }
 
-      std::swap( bezt1->h1, bezt1->h2);
-      std::swap( bezt1->f1, bezt1->f3);
+      std::swap(bezt1->h1, bezt1->h2);
+      std::swap(bezt1->f1, bezt1->f3);
 
       if (bezt1 != bezt2) {
-        std::swap( bezt2->h1, bezt2->h2);
-        std::swap( bezt2->f1, bezt2->f3);
+        std::swap(bezt2->h1, bezt2->h2);
+        std::swap(bezt2->f1, bezt2->f3);
         bezt1->tilt = -bezt1->tilt;
         bezt2->tilt = -bezt2->tilt;
       }
@@ -4469,7 +4469,7 @@ void BKE_nurb_direction_switch(Nurb *nu)
     bp2 = bp1 + (a - 1);
     a /= 2;
     while (bp1 != bp2 && a > 0) {
-      std::swap( *bp1, *bp2);
+      std::swap(*bp1, *bp2);
       a--;
       bp1->tilt = -bp1->tilt;
       bp2->tilt = -bp2->tilt;
@@ -4491,7 +4491,7 @@ void BKE_nurb_direction_switch(Nurb *nu)
         fp2 = fp1 + (a - 1);
         a /= 2;
         while (fp1 != fp2 && a > 0) {
-          std::swap( *fp1, *fp2);
+          std::swap(*fp1, *fp2);
           a--;
           fp1++;
           fp2--;
@@ -4530,7 +4530,7 @@ void BKE_nurb_direction_switch(Nurb *nu)
       a /= 2;
 
       while (bp1 != bp2 && a > 0) {
-        std::swap( *bp1, *bp2);
+        std::swap(*bp1, *bp2);
         a--;
         bp1++;
         bp2--;
diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc
index 57f49c23b88..124de007ade 100644
--- a/source/blender/blenkernel/intern/scene.cc
+++ b/source/blender/blenkernel/intern/scene.cc
@@ -1686,14 +1686,14 @@ static void scene_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old)
   Scene *scene_new = (Scene *)id_new;
   Scene *scene_old = (Scene *)id_old;
 
-  std::swap( scene_old->cursor, scene_new->cursor);
+  std::swap(scene_old->cursor, scene_new->cursor);
   if (scene_new->toolsettings != nullptr && scene_old->toolsettings != nullptr) {
     /* First try to restore ID pointers that can be and should be preserved (like brushes or
      * palettes), and counteract the swap of the whole ToolSettings structs below for the others
      * (like object ones). */
     scene_foreach_toolsettings(
         nullptr, scene_new->toolsettings, true, reader, scene_old->toolsettings);
-    std::swap( *scene_old->toolsettings, *scene_new->toolsettings);
+    std::swap(*scene_old->toolsettings, *scene_new->toolsettings);
   }
 }
 
diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc
index ab965fb7560..44a14f254c0 100644
--- a/source/blender/editors/interface/interface_handlers.cc
+++ b/source/blender/editors/interface/interface_handlers.cc
@@ -3087,7 +3087,7 @@ static void ui_textedit_set_cursor_select(uiBut *but, uiHandleButtonData *data,
   but->selsta = but->pos;
   but->selend = data->sel_pos_init;
   if (but->selend < but->selsta) {
- std::swap(but->selsta, but->selend);
+    std::swap(but->selsta, but->selend);
   }
 
   ui_but_update(but);
@@ -3190,7 +3190,7 @@ static void ui_textedit_move(uiBut *but,
       but->selend = data->sel_pos_init;
     }
     if (but->selend < but->selsta) {
-     std::swap( but->selsta, but->selend);
+      std::swap(but->selsta, but->selend);
     }
   }
 }
diff --git a/source/blender/editors/space_image/image_undo.cc b/source/blender/editors/space_image/image_undo.cc
index b7aaca0bbd8..085a045b6c4 100644
--- a/source/blender/editors/space_image/image_undo.cc
+++ b/source/blender/editors/space_image/image_undo.cc
@@ -261,10 +261,10 @@ void *ED_image_paint_tile_push(PaintTileMap *paint_tile_map,
               ED_IMAGE_UNDO_TILE_SIZE);
 
   if (has_float) {
-   std::swap( ptile->rect.fp, (*tmpibuf)->rect_float);
+    std::swap(ptile->rect.fp, (*tmpibuf)->rect_float);
   }
   else {
-   std::swap(ptile->rect.uint, (*tmpibuf)->rect);
+    std::swap(ptile->rect.uint, (*tmpibuf)->rect);
   }
 
   PaintTileKey key = {};
@@ -299,10 +299,10 @@ static void ptile_restore_runtime_map(PaintTileMap *paint_tile_map)
     const bool has_float = (ibuf->rect_float != nullptr);
 
     if (has_float) {
-     std::swap( ptile->rect.fp, tmpibuf->rect_float);
+      std::swap(ptile->rect.fp, tmpibuf->rect_float);
     }
     else {
-     std::swap(ptile->rect.uint, tmpibuf->rect);
+      std::swap(ptile->rect.uint, tmpibuf->rect);
     }
 
     IMB_rectcpy(ibuf,
@@ -315,10 +315,10 @@ static void ptile_restore_runtime_map(PaintTileMap *paint_tile_map)
                 ED_IMAGE_UNDO_TILE_SIZE);
 
     if (has_float) {
-     std::swap( ptile->rect.fp, tmpibuf->rect_float);
+      std::swap(ptile->rect.fp, tmpibuf->rect_float);
     }
     else {
-     std::swap(ptile->rect.uint, tmpibuf->rect);
+      std::swap(ptile->rect.uint, tmpibuf->rect);
     }
 
     /* Force OpenGL reload (maybe partial update will operate better?) */
@@ -380,19 +380,19 @@ static void utile_init_from_imbuf(
   const bool has_float = ibuf->rect_float;
 
   if (has_float) {
-   std::swap( utile->rect.fp, tmpibuf->rect_float);
+    std::swap(utile->rect.fp, tmpibuf->rect_float);
   }
   else {
-   std::swap(utile->rect.uint_ptr, tmpibuf->rect);
+    std::swap(utile->rect.uint_ptr, tmpibuf->rect);
   }
 
   IMB_rectcpy(tmpibuf, ibuf, 0, 0, x, y, ED_IMAGE_UNDO_TILE_SIZE, ED_IMAGE_UNDO_TILE_SIZE);
 
   if (has_float) {
-   std::swap( utile->rect.fp, tmpibuf->rect_float);
+    std::swap(utile->rect.fp, tmpibuf->rect_float);
   }
   else {
-   std::swap(utile->rect.uint_ptr, tmpibuf->rect);
+    std::swap(utile->rect.uint_ptr, tmpibuf->rect);
   }
 }
 
diff --git a/source/blender/editors/space_node/node_gizmo.cc b/source/blender/editors/space_node/node_gizmo.cc
index a55960b5583..f2e788fce93 100644
--- a/source/blender/editors/space_node/node_gizmo.cc
+++ b/source/blender/editors/space_node/node_gizmo.cc
@@ -285,10 +285,10 @@ static void gizmo_node_crop_prop_matrix_set(const wmGizmo *gz,
   rct_isect.ymax = 1;
   BLI_rctf_isect(&rct_isect, &rct, &rct);
   if (nx) {
-   std::swap( rct.xmin, rct.xmax);
+    std::swap(rct.xmin, rct.xmax);
   }
   if (ny) {
-   std::swap( rct.ymin, rct.ymax);
+    std::swap(rct.ymin, rct.ymax);
   }
   two_xy_from_rect(nxy, &rct, dims, is_relative);
   gizmo_node_crop_update(crop_group);
diff --git a/source/blender/editors/transform/transform_convert_node.cc b/source/blender/editors/transform/transform_convert_node.cc
index e49ec77fdbf..1c35323a154 100644
--- a/source/blender/editors/transform/transform_convert_node.cc
+++ b/source/blender/editors/transform/transform_convert_node.cc
@@ -156,7 +156,8 @@ static void node_snap_grid_apply(TransInfo *t)
 {
   using namespace blender;
 
-  if (!(transform_snap_is_active(t) && (t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)))) {
+  if (!(transform_snap_is_active(t) &&
+        (t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)))) {
     return;
   }
 
diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc
index 618bcbd95e8..145be5a1b8a 100644
--- a/source/blender/geometry/intern/mesh_merge_by_distance.cc
+++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc
@@ -1654,7 +1654,7 @@ std::optional<Mesh *> mesh_merge_by_distance_connected(const Mesh &mesh,
       continue;
     }
     if (v1 > v2) {
-    std::swap( v1, v2);
+      std::swap(v1, v2);
     }
     WeldVertexCluster *v1_cluster = &vert_clusters[v1];
     WeldVertexCluster *v2_cluster = &vert_clusters[v2];
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc
index 357b818bbdc..68c8dd8c18d 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.cc
@@ -1878,7 +1878,7 @@ static void lineart_edge_neighbor_init_task(void *__restrict userdata,
   adj_e->v1 = mloop[looptri->tri[i % 3]].v;
   adj_e->v2 = mloop[looptri->tri[(i + 1) % 3]].v;
   if (adj_e->v1 > adj_e->v2) {
-   std::swap( adj_e->v1, adj_e->v2);
+    std::swap(adj_e->v1, adj_e->v2);
   }
   edge_nabr->e = -1;
 
@@ -3267,7 +3267,7 @@ static void lineart_add_isec_thread(LineartIsecThread *th,
   isec_single->tri1 = tri1;
   isec_single->tri2 = tri2;
   if (tri1->target_reference > tri2->target_reference) {
-   std::swap( isec_single->tri1, isec_single->tri2);
+    std::swap(isec_single->tri1, isec_single->tri2);
   }
   th->current++;
 }
diff --git a/source/blender/render/intern/multires_bake.cc b/source/blender/render/intern/multires_bake.cc
index 5f27a1b9dc7..34d6a5312f7 100644
--- a/source/blender/render/intern/multires_bake.cc
+++ b/source/blender/render/intern/multires_bake.cc
@@ -259,7 +259,7 @@ static void rasterize_half(const MBakeRast *bake_rast,
     float x_r = l_stable != 0 ? (s0_l + (((s1_l - s0_l) * (y - t0_l)) / (t1_l - t0_l))) : s0_l;
 
     if (is_mid_right != 0) {
-     std::swap( x_l, x_r);
+      std::swap(x_l, x_r);
     }
 
     iXl = int(ceilf(x_l));
@@ -298,17 +298,17 @@ static void bake_rasterize(const MBakeRast *bake_rast,
 
   /* sort by T */
   if (tlo > tmi && tlo > thi) {
-   std::swap( shi, slo);
-   std::swap( thi, tlo);
+    std::swap(shi, slo);
+    std::swap(thi, tlo);
   }
   else if (tmi > thi) {
-   std::swap( shi, smi);
-   std::swap( thi, tmi);
+    std::swap(shi, smi);
+    std::swap(thi, tmi);
   }
 
   if (tlo > tmi) {
-   std::swap( slo, smi);
-   std::swap( tlo, tmi);
+    std::swap(slo, smi);
+    std::swap(tlo, tmi);
   }
 
   /* check if mid point is to the left or to the right of the lo-hi edge */
diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list