[Bf-blender-cvs] [1f1dcdf] master: Cycles: Move system headers include to the top of the files

Sergey Sharybin noreply at git.blender.org
Mon Oct 6 12:39:21 CEST 2014


Commit: 1f1dcdfd76ee70d4c466af0e5917c2e40b39a989
Author: Sergey Sharybin
Date:   Mon Oct 6 13:39:19 2014 +0600
Branches: master
https://developer.blender.org/rB1f1dcdfd76ee70d4c466af0e5917c2e40b39a989

Cycles: Move system headers include to the top of the files

This is a good practice to do anyway, plus it'll help with the upcoming change.

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

M	intern/cycles/kernel/osl/osl_globals.h
M	intern/cycles/kernel/osl/osl_shader.cpp
M	intern/cycles/render/shader.h

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

diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index 5a658d8..9c3134e 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -20,7 +20,6 @@
 #ifdef WITH_OSL
 
 #include <OSL/oslexec.h>
-#include <cmath>
 
 #include "util_map.h"
 #include "util_param.h"
diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp
index 4849811..ca0c2cc 100644
--- a/intern/cycles/kernel/osl/osl_shader.cpp
+++ b/intern/cycles/kernel/osl/osl_shader.cpp
@@ -14,6 +14,8 @@
  * limitations under the License
  */
 
+#include <OSL/oslexec.h>
+
 #include "kernel_compat_cpu.h"
 #include "kernel_montecarlo.h"
 #include "kernel_types.h"
@@ -34,7 +36,6 @@
 
 #include "attribute.h"
 
-#include <OSL/oslexec.h>
 
 CCL_NAMESPACE_BEGIN
 
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index 0ed6d2d..368496f 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -17,6 +17,10 @@
 #ifndef __SHADER_H__
 #define __SHADER_H__
 
+#ifdef WITH_OSL
+#  include <OSL/oslexec.h>
+#endif
+
 #include "attribute.h"
 #include "kernel_types.h"
 
@@ -25,10 +29,6 @@
 #include "util_string.h"
 #include "util_types.h"
 
-#ifdef WITH_OSL
-#include <OSL/oslexec.h>
-#endif
-
 CCL_NAMESPACE_BEGIN
 
 class Device;




More information about the Bf-blender-cvs mailing list