[Bf-blender-cvs] [4b9e05b4289] master: Cleanup: clang-format, sort structs & cmake files

Campbell Barton noreply at git.blender.org
Wed Aug 14 17:40:21 CEST 2019


Commit: 4b9e05b42898073c65d97e20295a773f6ce7e78b
Author: Campbell Barton
Date:   Thu Aug 15 01:34:58 2019 +1000
Branches: master
https://developer.blender.org/rB4b9e05b42898073c65d97e20295a773f6ce7e78b

Cleanup: clang-format, sort structs & cmake files

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

M	intern/cycles/kernel/shaders/node_clamp.osl
M	intern/cycles/kernel/shaders/node_map_range.osl
M	source/blender/alembic/intern/abc_customdata.h
M	source/blender/blenkernel/BKE_material.h
M	source/blender/blenlib/intern/delaunay_2d.c
M	source/blender/draw/CMakeLists.txt
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/editors/include/ED_text.h
M	source/blender/editors/space_sequencer/CMakeLists.txt
M	tests/gtests/blenlib/BLI_path_util_test.cc
M	tests/gtests/blenlib/BLI_string_test.cc

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

diff --git a/intern/cycles/kernel/shaders/node_clamp.osl b/intern/cycles/kernel/shaders/node_clamp.osl
index 43b0fe88172..87dc1ccdb12 100644
--- a/intern/cycles/kernel/shaders/node_clamp.osl
+++ b/intern/cycles/kernel/shaders/node_clamp.osl
@@ -16,8 +16,7 @@
 
 #include "stdosl.h"
 
-shader node_clamp(float Value = 1.0, float Min = 0.0, float Max = 1.0,
-                  output float Result = 0.0)
+shader node_clamp(float Value = 1.0, float Min = 0.0, float Max = 1.0, output float Result = 0.0)
 {
-    Result = clamp(Value, Min, Max);
+  Result = clamp(Value, Min, Max);
 }
diff --git a/intern/cycles/kernel/shaders/node_map_range.osl b/intern/cycles/kernel/shaders/node_map_range.osl
index 417d2ae50a8..8a28edf5f35 100644
--- a/intern/cycles/kernel/shaders/node_map_range.osl
+++ b/intern/cycles/kernel/shaders/node_map_range.osl
@@ -16,8 +16,12 @@
 
 #include "stdosl.h"
 
-shader node_map_range(float Value = 1.0, float FromMin = 0.0, float FromMax = 1.0,
-                      float ToMin = 0.0, float ToMax = 1.0, output float Result = 0.0)
+shader node_map_range(float Value = 1.0,
+                      float FromMin = 0.0,
+                      float FromMax = 1.0,
+                      float ToMin = 0.0,
+                      float ToMax = 1.0,
+                      output float Result = 0.0)
 {
   if (FromMax != FromMin) {
     Result = ToMin + ((Value - FromMin) / (FromMax - FromMin)) * (ToMax - ToMin);
diff --git a/source/blender/alembic/intern/abc_customdata.h b/source/blender/alembic/intern/abc_customdata.h
index 0ffafa8848e..52f55a41628 100644
--- a/source/blender/alembic/intern/abc_customdata.h
+++ b/source/blender/alembic/intern/abc_customdata.h
@@ -28,11 +28,11 @@
 #include <Alembic/AbcGeom/All.h>
 
 struct CustomData;
-struct Mesh;
 struct MLoop;
 struct MLoopUV;
 struct MPoly;
 struct MVert;
+struct Mesh;
 
 using Alembic::Abc::ICompoundProperty;
 using Alembic::Abc::OCompoundProperty;
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index c7d9a8350b3..5bb69c7166e 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -28,12 +28,12 @@
 extern "C" {
 #endif
 
-struct bNode;
 struct ID;
 struct Main;
 struct Material;
 struct Object;
 struct Scene;
+struct bNode;
 
 /* materials */
 
diff --git a/source/blender/blenlib/intern/delaunay_2d.c b/source/blender/blenlib/intern/delaunay_2d.c
index bb5bd6860c9..8e2687a6b2f 100644
--- a/source/blender/blenlib/intern/delaunay_2d.c
+++ b/source/blender/blenlib/intern/delaunay_2d.c
@@ -36,9 +36,9 @@
 /* Uncomment this define to get helpful debugging functions etc. defined. */
 // #define DEBUG_CDT
 
-struct CDTVert;
 struct CDTEdge;
 struct CDTFace;
+struct CDTVert;
 
 typedef struct SymEdge {
   struct SymEdge *next; /* In face, doing CCW traversal of face. */
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt
index 84302e3cf44..e34ad155f21 100644
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@ -128,8 +128,8 @@ set(SRC
   engines/gpencil/gpencil_engine.h
   engines/gpencil/gpencil_render.c
   engines/gpencil/gpencil_shader_fx.c
-  engines/select/select_engine.c
   engines/select/select_draw_utils.c
+  engines/select/select_engine.c
 
   DRW_engine.h
   DRW_select_buffer.h
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index a232e1376d3..cb6c66ed795 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -25,9 +25,9 @@
 #define __ED_ANIM_API_H__
 
 struct AnimData;
+struct Depsgraph;
 struct ID;
 struct ListBase;
-struct Depsgraph;
 
 struct ARegion;
 struct Main;
diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h
index 40af82acdaf..ade1dde6c33 100644
--- a/source/blender/editors/include/ED_text.h
+++ b/source/blender/editors/include/ED_text.h
@@ -25,11 +25,11 @@
 #define __ED_TEXT_H__
 
 struct ARegion;
-struct bContext;
 struct SpaceText;
 struct Text;
 struct UndoStep;
 struct UndoType;
+struct bContext;
 
 bool ED_text_region_location_from_cursor(struct SpaceText *st,
                                          struct ARegion *ar,
diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt
index d57be0c85c3..84ded1dd2c7 100644
--- a/source/blender/editors/space_sequencer/CMakeLists.txt
+++ b/source/blender/editors/space_sequencer/CMakeLists.txt
@@ -20,8 +20,8 @@ set(INC
   ../../blenkernel
   ../../blenlib
   ../../blentranslation
-  ../../gpu
   ../../depsgraph
+  ../../gpu
   ../../imbuf
   ../../makesdna
   ../../makesrna
diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc
index c9a7436df31..0bdaa346428 100644
--- a/tests/gtests/blenlib/BLI_path_util_test.cc
+++ b/tests/gtests/blenlib/BLI_path_util_test.cc
@@ -619,7 +619,6 @@ TEST(path_util, PathFrameGet)
 }
 #undef PATH_FRAME_GET
 
-
 /* BLI_path_extension */
 TEST(path_util, PathExtension)
 {
@@ -627,8 +626,8 @@ TEST(path_util, PathExtension)
   EXPECT_EQ(NULL, BLI_path_extension("Text"));
   EXPECT_EQ(NULL, BLI_path_extension("Text…001"));
 
-  EXPECT_STREQ(".",  BLI_path_extension("some/file."));
-  EXPECT_STREQ(".gz",  BLI_path_extension("some/file.tar.gz"));
+  EXPECT_STREQ(".", BLI_path_extension("some/file."));
+  EXPECT_STREQ(".gz", BLI_path_extension("some/file.tar.gz"));
   EXPECT_STREQ(".abc", BLI_path_extension("some.def/file.abc"));
   EXPECT_STREQ(".abc", BLI_path_extension("C:\\some.def\\file.abc"));
   EXPECT_STREQ(".001", BLI_path_extension("Text.001"));
diff --git a/tests/gtests/blenlib/BLI_string_test.cc b/tests/gtests/blenlib/BLI_string_test.cc
index c79afdfb92c..d69cb519494 100644
--- a/tests/gtests/blenlib/BLI_string_test.cc
+++ b/tests/gtests/blenlib/BLI_string_test.cc
@@ -590,7 +590,6 @@ TEST(string, StringStrncasestr)
   EXPECT_EQ(res, (void *)NULL);
 }
 
-
 /* BLI_string_is_decimal */
 TEST(string, StrIsDecimal)
 {



More information about the Bf-blender-cvs mailing list