[Bf-blender-cvs] [5fed9ac9b58] blender-v2.83-release: Fix clang-format differences between version 6 and 9

Brecht Van Lommel noreply at git.blender.org
Tue Apr 21 13:17:24 CEST 2020


Commit: 5fed9ac9b5885820a6e0845120cd93f7141fdb84
Author: Brecht Van Lommel
Date:   Tue Apr 21 12:39:12 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB5fed9ac9b5885820a6e0845120cd93f7141fdb84

Fix clang-format differences between version 6 and 9

Version 6 does not appear to respect clang-format off for header sorting.

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

M	source/blender/blenlib/intern/fnmatch.c
M	source/blender/blenlib/intern/storage_apple.mm
M	source/blender/freestyle/FRS_precomp.h
M	source/blender/freestyle/intern/application/AppCanvas.cpp
M	source/blender/freestyle/intern/application/AppConfig.h
M	source/blender/freestyle/intern/application/AppView.cpp
M	source/blender/freestyle/intern/application/AppView.h
M	source/blender/freestyle/intern/application/Controller.cpp
M	source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
M	source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M	source/blender/freestyle/intern/geometry/BBox.h
M	source/blender/freestyle/intern/geometry/FitCurve.cpp
M	source/blender/freestyle/intern/geometry/GeomCleaner.cpp
M	source/blender/freestyle/intern/geometry/normal_cycle.cpp
M	source/blender/freestyle/intern/stroke/Canvas.cpp
M	source/blender/freestyle/intern/stroke/Chain.cpp
M	source/blender/freestyle/intern/stroke/ChainingIterators.h
M	source/blender/freestyle/intern/stroke/Curve.cpp
M	source/blender/freestyle/intern/stroke/Operators.cpp
M	source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
M	source/blender/freestyle/intern/stroke/Predicates1D.h
M	source/blender/freestyle/intern/stroke/Stroke.cpp
M	source/blender/freestyle/intern/stroke/StrokeLayer.cpp
M	source/blender/freestyle/intern/stroke/StrokeRenderer.h
M	source/blender/freestyle/intern/stroke/StrokeRep.cpp
M	source/blender/freestyle/intern/stroke/StrokeTesselator.cpp
M	source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
M	source/blender/freestyle/intern/system/PythonInterpreter.h
M	source/blender/freestyle/intern/system/StringUtils.cpp
M	source/blender/freestyle/intern/system/StringUtils.h
M	source/blender/freestyle/intern/view_map/GridDensityProvider.h
M	source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
M	source/blender/freestyle/intern/view_map/SphericalGrid.h
M	source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
M	source/blender/freestyle/intern/view_map/ViewMap.cpp
M	source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
M	source/blender/freestyle/intern/view_map/ViewMapTesselator.h
M	source/blender/freestyle/intern/winged_edge/WFillGrid.cpp
M	source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp
M	source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp
M	source/blender/makesrna/intern/rna_brush.c

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

diff --git a/source/blender/blenlib/intern/fnmatch.c b/source/blender/blenlib/intern/fnmatch.c
index 3df09976972..33fe34e7c24 100644
--- a/source/blender/blenlib/intern/fnmatch.c
+++ b/source/blender/blenlib/intern/fnmatch.c
@@ -27,8 +27,9 @@
 # define _GNU_SOURCE    1
 #endif
 
-#include <errno.h>
 #include <ctype.h>
+#include <errno.h>
+
 #include "BLI_fnmatch.h"
 
 
diff --git a/source/blender/blenlib/intern/storage_apple.mm b/source/blender/blenlib/intern/storage_apple.mm
index 0cc246b8d4f..08d2cfdf4a4 100644
--- a/source/blender/blenlib/intern/storage_apple.mm
+++ b/source/blender/blenlib/intern/storage_apple.mm
@@ -30,7 +30,9 @@
 
 bool BLI_file_alias_target(char targetpath[FILE_MAXDIR], const char *filepath)
 {
+  /* clang-format off */
   @autoreleasepool {
+    /* clang-format on */
     NSError *error = nil;
     NSURL *shortcutURL = [[NSURL alloc] initFileURLWithFileSystemRepresentation:filepath
                                                                     isDirectory:NO
@@ -64,7 +66,9 @@ eFileAttributes BLI_file_attributes(const char *path)
 {
   int ret = 0;
 
+  /* clang-format off */
   @autoreleasepool {
+    /* clang-format on */
     NSURL *fileURL = [[NSURL alloc] initFileURLWithFileSystemRepresentation:path
                                                                 isDirectory:NO
                                                               relativeToURL:nil];
diff --git a/source/blender/freestyle/FRS_precomp.h b/source/blender/freestyle/FRS_precomp.h
index 52f5b58aed0..64eac955fc9 100644
--- a/source/blender/freestyle/FRS_precomp.h
+++ b/source/blender/freestyle/FRS_precomp.h
@@ -1,26 +1,27 @@
 /* Pre-compiled headers, see: D2606. */
 
-/* clang-format off */
 #include <Python.h>
-#include <pthread.h>
-#include <string>
-#include <vector>
-#include <iostream>
-#include <math.h>
-#include <stdbool.h>
+
 #include <algorithm>
-#include <time.h>
+#include <deque>
+#include <fstream>
+#include <iomanip>
+#include <iostream>
 #include <iterator>
+#include <list>
+#include <map>
+#include <math.h>
 #include <memory>
+#include <pthread.h>
 #include <set>
-#include <map>
-#include <list>
-#include <deque>
 #include <sstream>
-#include <stdarg.h>
-#include <fstream>
-#include <iomanip>
 #include <stack>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <string>
+#include <time.h>
+#include <vector>
+
 #include "intern/python/BPy_BBox.h"
 #include "intern/python/BPy_BinaryPredicate0D.h"
 #include "intern/python/BPy_BinaryPredicate1D.h"
@@ -47,5 +48,3 @@
 #include "intern/python/BPy_ViewMap.h"
 #include "intern/python/BPy_ViewShape.h"
 #include "intern/python/Director.h"
-
-/* clang-format on */
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index 1f3aea65e24..5681c65e5d2 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -18,18 +18,17 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
-#include "Controller.h"
+#include "AppCanvas.h"
+#include "AppConfig.h"
 #include "AppView.h"
+#include "Controller.h"
+
 #include "../image/Image.h"
-#include "../system/TimeStamp.h"
 #include "../stroke/StrokeRenderer.h"
-#include "AppCanvas.h"
-#include "AppConfig.h"
 #include "../stroke/StyleModule.h"
+#include "../system/TimeStamp.h"
 
 #include "../system/StringUtils.h"
-/* clang-format on */
 namespace Freestyle {
 
 AppCanvas::AppCanvas() : Canvas()
diff --git a/source/blender/freestyle/intern/application/AppConfig.h b/source/blender/freestyle/intern/application/AppConfig.h
index 725b29e7dd8..34f5d220cfe 100644
--- a/source/blender/freestyle/intern/application/AppConfig.h
+++ b/source/blender/freestyle/intern/application/AppConfig.h
@@ -22,15 +22,14 @@
  * \brief Configuration file
  */
 
-/* clang-format off */
-#include <string>
 #include <algorithm>
+#include <string>
+
 #include "../system/Precision.h"
 
 #ifdef WITH_CXX_GUARDEDALLOC
 #  include "MEM_guardedalloc.h"
 #endif
-/* clang-format on */
 
 using namespace std;
 
diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp
index 771d4b0fca8..0956d33a20e 100644
--- a/source/blender/freestyle/intern/application/AppView.cpp
+++ b/source/blender/freestyle/intern/application/AppView.cpp
@@ -18,20 +18,20 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
 #include <iostream>
 
-#include "Controller.h"
 #include "AppConfig.h"
 #include "AppView.h"
-#include "../view_map/Silhouette.h"
-#include "../view_map/ViewMap.h"
+#include "Controller.h"
+
 #include "../scene_graph/LineRep.h"
 #include "../scene_graph/NodeLight.h"
 #include "../scene_graph/NodeShape.h"
 #include "../scene_graph/VertexRep.h"
 #include "../stroke/Canvas.h"
 #include "../system/StringUtils.h"
+#include "../view_map/Silhouette.h"
+#include "../view_map/ViewMap.h"
 
 extern "C" {
 #include "BLI_blenlib.h"
@@ -46,7 +46,6 @@ extern "C" {
 
 #include "FRS_freestyle.h"
 }
-/* clang-format on */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h
index 4c60b1515f3..6009f2b0e50 100644
--- a/source/blender/freestyle/intern/application/AppView.h
+++ b/source/blender/freestyle/intern/application/AppView.h
@@ -21,10 +21,10 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
 #include "AppConfig.h"
-#include "../geometry/Geom.h"
+
 #include "../geometry/BBox.h"
+#include "../geometry/Geom.h"
 #include "../scene_graph/NodeDrawingStyle.h"
 #include "../system/Precision.h"
 
@@ -33,7 +33,6 @@
 #ifdef WITH_CXX_GUARDEDALLOC
 #  include "MEM_guardedalloc.h"
 #endif
-/* clang-format on */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index c2f6796bf31..66195745cbb 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -18,18 +18,17 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
 extern "C" {
 #include <Python.h>
 }
 
-#include <string>
-#include <fstream>
 #include <float.h>
+#include <fstream>
+#include <string>
 
-#include "AppView.h"
 #include "AppCanvas.h"
 #include "AppConfig.h"
+#include "AppView.h"
 #include "Controller.h"
 
 #include "../image/Image.h"
@@ -42,12 +41,12 @@ extern "C" {
 #include "../scene_graph/VertexRep.h"
 
 #include "../stroke/PSStrokeRenderer.h"
-#include "../stroke/TextStrokeRenderer.h"
 #include "../stroke/StrokeTesselator.h"
 #include "../stroke/StyleModule.h"
+#include "../stroke/TextStrokeRenderer.h"
 
-#include "../system/StringUtils.h"
 #include "../system/PythonInterpreter.h"
+#include "../system/StringUtils.h"
 
 #include "../view_map/SteerableViewMap.h"
 #include "../view_map/ViewMap.h"
@@ -56,21 +55,20 @@ extern "C" {
 
 #include "../winged_edge/Curvature.h"
 #include "../winged_edge/WEdge.h"
-#include "../winged_edge/WingedEdgeBuilder.h"
 #include "../winged_edge/WXEdgeBuilder.h"
+#include "../winged_edge/WingedEdgeBuilder.h"
 
 #include "../blender_interface/BlenderFileLoader.h"
 #include "../blender_interface/BlenderStrokeRenderer.h"
 #include "../blender_interface/BlenderStyleModule.h"
 
 #include "BKE_global.h"
-#include "BLI_utildefines.h"
 #include "BLI_path_util.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_freestyle_types.h"
 
 #include "FRS_freestyle.h"
-/* clang-format off */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
index fe93b179eb6..ad6379d5f52 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
@@ -21,9 +21,8 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
-#include <string.h>
 #include <float.h>
+#include <string.h>
 
 #include "../geometry/BBox.h"
 #include "../geometry/Geom.h"
@@ -31,8 +30,8 @@
 #include "../geometry/GeomUtils.h"
 #include "../scene_graph/IndexedFaceSet.h"
 #include "../scene_graph/NodeGroup.h"
-#include "../scene_graph/NodeTransform.h"
 #include "../scene_graph/NodeShape.h"
+#include "../scene_graph/NodeTransform.h"
 #include "../system/FreestyleConfig.h"
 #include "../system/RenderMonitor.h"
 
@@ -64,7 +63,6 @@ extern "C" {
 #ifdef WITH_CXX_GUARDEDALLOC
 #  include "MEM_guardedalloc.h"
 #endif
-/* clang-format on */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index a61bad7cf8a..b8f3a27be9c 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -18,7 +18,6 @@
  * \ingroup freestyle
  */
 
-/* clang-format off */
 #include "BlenderStrokeRenderer.h"
 
 #include "../application/AppConfig.h"
@@ -68,7 +67,6 @@ extern "C" {
 }
 
 #include <limits.h>
-/* clang-format on */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/geometry/BBox.h b/source/blender/freestyle/intern/geometry/BBox.h
index 0031a7ce860..a8965e63451 100644
--- a/source/blender/freestyle/intern/geometry/BBox.h
+++ b/source/blender/freestyle/intern/geometry/BBox.h
@@ -22,16 +22,14 @@
  * \brief A class to hold a bounding box
  */
 
-/* clang-format off */
-#include <stdlib.h>
 #include <algorithm>
+#include <stdlib.h>
 
 #include "BLI_utildefines.h"
 
 #ifdef WITH_CXX_GUARDEDALLOC
 #  include "MEM_guardedalloc.h"
 #endif
-/* clang-format on */
 
 namespace Freestyle {
 
diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp
index bfc5e16aa2a..b60de93c4a1 100644
--- a/source/blender/freestyle/intern/geometry/FitCurve.cpp
+++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp
@@ -20,13 +20,11 @@
  * \brief from "Graphics Gems", Academic Press, 1990
  */
 
-/* clang-format off */
 #include <cstdlib>  // for malloc and free
-#include 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list