diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 17:09:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 17:10:36 +0300 |
commit | 3d305b5a37e8d9a8b986d13cb210dce547fcc020 (patch) | |
tree | 5bfc70157e4a1d0e33b87c0810842a67e9314f2d /intern/cycles | |
parent | d18e8ad1f369eae933f87cbe698391e1855d8b65 (diff) |
Cycles: Code cleanup, make strict flags happy about disabled OSL
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/render/mesh.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/render/osl.cpp | 36 | ||||
-rw-r--r-- | intern/cycles/render/shader.cpp | 2 |
4 files changed, 27 insertions, 18 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 32a4117e908..7a656360bd3 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -543,6 +543,9 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen node = script_node; } +#else + (void)b_data; + (void)b_ntree; #endif } else if (b_node.is_a(&RNA_ShaderNodeTexImage)) { diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index 4ec5312e9a3..c220a126f1a 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -653,6 +653,10 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att } } } +#else + (void)device; + (void)scene; + (void)mesh_attributes; #endif } diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index a0f6c368a9c..41844ae219f 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -860,75 +860,75 @@ void OSLCompiler::compile(OSLGlobals *og, Shader *shader) #else -void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath) +void OSLCompiler::add(ShaderNode * /*node*/, const char * /*name*/, bool /*isfilepath*/) { } -void OSLCompiler::parameter(const char *name, float f) +void OSLCompiler::parameter(const char * /*name*/, float /*f*/) { } -void OSLCompiler::parameter_color(const char *name, float3 f) +void OSLCompiler::parameter_color(const char * /*name*/, float3 /*f*/) { } -void OSLCompiler::parameter_vector(const char *name, float3 f) +void OSLCompiler::parameter_vector(const char * /*name*/, float3 /*f*/) { } -void OSLCompiler::parameter_point(const char *name, float3 f) +void OSLCompiler::parameter_point(const char * /*name*/, float3 /*f*/) { } -void OSLCompiler::parameter_normal(const char *name, float3 f) +void OSLCompiler::parameter_normal(const char * /*name*/, float3 /*f*/) { } -void OSLCompiler::parameter(const char *name, int f) +void OSLCompiler::parameter(const char * /*name*/, int /*f*/) { } -void OSLCompiler::parameter(const char *name, const char *s) +void OSLCompiler::parameter(const char * /*name*/, const char * /*s*/) { } -void OSLCompiler::parameter(const char *name, ustring s) +void OSLCompiler::parameter(const char * /*name*/, ustring /*s*/) { } -void OSLCompiler::parameter(const char *name, const Transform& tfm) +void OSLCompiler::parameter(const char * /*name*/, const Transform& /*tfm*/) { } -void OSLCompiler::parameter_array(const char *name, const float f[], int arraylen) +void OSLCompiler::parameter_array(const char * /*name*/, const float /*f*/[], int /*arraylen*/) { } -void OSLCompiler::parameter_color_array(const char *name, const float f[][3], int arraylen) +void OSLCompiler::parameter_color_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/) { } -void OSLCompiler::parameter_vector_array(const char *name, const float f[][3], int arraylen) +void OSLCompiler::parameter_vector_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/) { } -void OSLCompiler::parameter_normal_array(const char *name, const float f[][3], int arraylen) +void OSLCompiler::parameter_normal_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/) { } -void OSLCompiler::parameter_point_array(const char *name, const float f[][3], int arraylen) +void OSLCompiler::parameter_point_array(const char * /*name*/, const float /*f*/[][3], int /*arraylen*/) { } -void OSLCompiler::parameter_array(const char *name, const int f[], int arraylen) +void OSLCompiler::parameter_array(const char * /*name*/, const int /*f*/[], int /*arraylen*/) { } -void OSLCompiler::parameter_array(const char *name, const char * const s[], int arraylen) +void OSLCompiler::parameter_array(const char * /*name*/, const char * const /*s*/[], int /*arraylen*/) { } -void OSLCompiler::parameter_array(const char *name, const Transform tfm[], int arraylen) +void OSLCompiler::parameter_array(const char * /*name*/, const Transform /*tfm*/[], int /*arraylen*/) { } diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index 81a7b787885..3ae1e80c2af 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -252,6 +252,8 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem) { ShaderManager *manager; + (void)shadingsystem; /* Ignored when built without OSL. */ + #ifdef WITH_OSL if(shadingsystem == SHADINGSYSTEM_OSL) manager = new OSLShaderManager(); |