[Bf-blender-cvs] [f90a243d9c0] master: Cycles: Header cleanup in BVH: move self header to be the first one

Sergey Sharybin noreply at git.blender.org
Thu Apr 13 11:28:33 CEST 2017


Commit: f90a243d9c0fc53081744f8685aa8fbaddc9810c
Author: Sergey Sharybin
Date:   Thu Apr 13 11:20:33 2017 +0200
Branches: master
https://developer.blender.org/rBf90a243d9c0fc53081744f8685aa8fbaddc9810c

Cycles: Header cleanup in BVH: move self header to be the first one

This makes us more sure that header files are more self-sufficient.

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

M	intern/cycles/bvh/bvh4.h
M	intern/cycles/bvh/bvh_binning.cpp
M	intern/cycles/bvh/bvh_binning.h
M	intern/cycles/bvh/bvh_build.cpp
M	intern/cycles/bvh/bvh_build.h
M	intern/cycles/bvh/bvh_node.cpp
M	intern/cycles/bvh/bvh_node.h
M	intern/cycles/bvh/bvh_params.h
M	intern/cycles/bvh/bvh_sort.cpp
M	intern/cycles/bvh/bvh_sort.h
M	intern/cycles/bvh/bvh_split.cpp
M	intern/cycles/bvh/bvh_unaligned.cpp
M	intern/cycles/bvh/bvh_unaligned.h

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

diff --git a/intern/cycles/bvh/bvh4.h b/intern/cycles/bvh/bvh4.h
index 1e1e8565ea1..310909a37e1 100644
--- a/intern/cycles/bvh/bvh4.h
+++ b/intern/cycles/bvh/bvh4.h
@@ -84,5 +84,4 @@ protected:
 
 CCL_NAMESPACE_END
 
-#endif /* __BVH_H__ */
-
+#endif /* __BVH4_H__ */
diff --git a/intern/cycles/bvh/bvh_binning.cpp b/intern/cycles/bvh/bvh_binning.cpp
index 3226008f511..63a7fc11668 100644
--- a/intern/cycles/bvh/bvh_binning.cpp
+++ b/intern/cycles/bvh/bvh_binning.cpp
@@ -17,10 +17,10 @@
 
 //#define __KERNEL_SSE__
 
-#include <stdlib.h>
-
 #include "bvh/bvh_binning.h"
 
+#include <stdlib.h>
+
 #include "util/util_algorithm.h"
 #include "util/util_boundbox.h"
 #include "util/util_types.h"
diff --git a/intern/cycles/bvh/bvh_binning.h b/intern/cycles/bvh/bvh_binning.h
index 285f9c56a62..c2e259b1696 100644
--- a/intern/cycles/bvh/bvh_binning.h
+++ b/intern/cycles/bvh/bvh_binning.h
@@ -111,5 +111,4 @@ protected:
 
 CCL_NAMESPACE_END
 
-#endif
-
+#endif  /* __BVH_BINNING_H__ */
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 95c71b54da0..1880964355c 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -15,8 +15,9 @@
  * limitations under the License.
  */
 
-#include "bvh/bvh_binning.h"
 #include "bvh/bvh_build.h"
+
+#include "bvh/bvh_binning.h"
 #include "bvh/bvh_node.h"
 #include "bvh/bvh_params.h"
 #include "bvh_split.h"
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h
index 5733708050d..7b245139819 100644
--- a/intern/cycles/bvh/bvh_build.h
+++ b/intern/cycles/bvh/bvh_build.h
@@ -20,17 +20,17 @@
 
 #include <float.h>
 
-#include "bvh/bvh.h"
-#include "bvh/bvh_binning.h"
+#include "bvh/bvh_params.h"
 #include "bvh/bvh_unaligned.h"
 
-#include "util/util_boundbox.h"
 #include "util/util_task.h"
 #include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
 
+class Boundbox;
 class BVHBuildTask;
+class BVHNode;
 class BVHSpatialSplitBuildTask;
 class BVHParams;
 class InnerNode;
diff --git a/intern/cycles/bvh/bvh_node.cpp b/intern/cycles/bvh/bvh_node.cpp
index 4f788c66797..4237c62ab5b 100644
--- a/intern/cycles/bvh/bvh_node.cpp
+++ b/intern/cycles/bvh/bvh_node.cpp
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
+#include "bvh/bvh_node.h"
+
 #include "bvh/bvh.h"
 #include "bvh/bvh_build.h"
-#include "bvh/bvh_node.h"
 
 #include "util/util_debug.h"
 #include "util/util_vector.h"
diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h
index 60511b4b012..1c875f5a524 100644
--- a/intern/cycles/bvh/bvh_node.h
+++ b/intern/cycles/bvh/bvh_node.h
@@ -19,7 +19,6 @@
 #define __BVH_NODE_H__
 
 #include "util/util_boundbox.h"
-#include "util/util_debug.h"
 #include "util/util_types.h"
 
 CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/bvh/bvh_params.h b/intern/cycles/bvh/bvh_params.h
index 9795a7a4350..7dd699b33a4 100644
--- a/intern/cycles/bvh/bvh_params.h
+++ b/intern/cycles/bvh/bvh_params.h
@@ -246,4 +246,3 @@ struct BVHSpatialStorage {
 CCL_NAMESPACE_END
 
 #endif /* __BVH_PARAMS_H__ */
-
diff --git a/intern/cycles/bvh/bvh_sort.cpp b/intern/cycles/bvh/bvh_sort.cpp
index d29629c0279..3a01061b285 100644
--- a/intern/cycles/bvh/bvh_sort.cpp
+++ b/intern/cycles/bvh/bvh_sort.cpp
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-#include "bvh/bvh_build.h"
 #include "bvh/bvh_sort.h"
 
+#include "bvh/bvh_build.h"
+
 #include "util/util_algorithm.h"
 #include "util/util_debug.h"
 #include "util/util_task.h"
diff --git a/intern/cycles/bvh/bvh_sort.h b/intern/cycles/bvh/bvh_sort.h
index b49ca02eb60..936401d8607 100644
--- a/intern/cycles/bvh/bvh_sort.h
+++ b/intern/cycles/bvh/bvh_sort.h
@@ -18,8 +18,11 @@
 #ifndef __BVH_SORT_H__
 #define __BVH_SORT_H__
 
+#include <cstddef>
+
 CCL_NAMESPACE_BEGIN
 
+class BVHReference;
 class BVHUnaligned;
 struct Transform;
 
@@ -33,4 +36,3 @@ void bvh_reference_sort(int start,
 CCL_NAMESPACE_END
 
 #endif /* __BVH_SORT_H__ */
-
diff --git a/intern/cycles/bvh/bvh_split.cpp b/intern/cycles/bvh/bvh_split.cpp
index b10d69a495d..c55ba40b565 100644
--- a/intern/cycles/bvh/bvh_split.cpp
+++ b/intern/cycles/bvh/bvh_split.cpp
@@ -15,8 +15,9 @@
  * limitations under the License.
  */
 
-#include "bvh/bvh_build.h"
 #include "bvh/bvh_split.h"
+
+#include "bvh/bvh_build.h"
 #include "bvh/bvh_sort.h"
 
 #include "render/mesh.h"
diff --git a/intern/cycles/bvh/bvh_unaligned.cpp b/intern/cycles/bvh/bvh_unaligned.cpp
index ef227d20ea9..b522a8f3e10 100644
--- a/intern/cycles/bvh/bvh_unaligned.cpp
+++ b/intern/cycles/bvh/bvh_unaligned.cpp
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-
 #include "bvh/bvh_unaligned.h"
 
 #include "render/mesh.h"
diff --git a/intern/cycles/bvh/bvh_unaligned.h b/intern/cycles/bvh/bvh_unaligned.h
index f41bae79e2b..c3ece051cd5 100644
--- a/intern/cycles/bvh/bvh_unaligned.h
+++ b/intern/cycles/bvh/bvh_unaligned.h
@@ -78,4 +78,3 @@ protected:
 CCL_NAMESPACE_END
 
 #endif /* __BVH_UNALIGNED_H__ */
-




More information about the Bf-blender-cvs mailing list