diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
commit | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (patch) | |
tree | 982857c47d650cb3f53df065cdcbcca827bff56d /intern/cycles/render/osl.cpp | |
parent | 62fbb7d4a10bea1ce88a486657a87743b93c9fd1 (diff) |
Cleanup: strip trailing space for cycles
Diffstat (limited to 'intern/cycles/render/osl.cpp')
-rw-r--r-- | intern/cycles/render/osl.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index dde622bff8a..fdd872f62b9 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -122,7 +122,7 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene shader->need_update = false; need_update = false; - + /* set texture system */ scene->image_manager->set_osl_texture_system((void*)ts); @@ -578,7 +578,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input) /* strip whitespace */ while((i = sname.find(" ")) != string::npos) sname.replace(i, 1, ""); - + /* if output exists with the same name, add "In" suffix */ foreach(ShaderOutput *output, node->outputs) { if(input->name() == output->name()) { @@ -586,7 +586,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input) break; } } - + return sname; } @@ -598,7 +598,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output) /* strip whitespace */ while((i = sname.find(" ")) != string::npos) sname.replace(i, 1, ""); - + /* if input exists with the same name, add "Out" suffix */ foreach(ShaderInput *input, node->inputs) { if(input->name() == output->name()) { @@ -606,7 +606,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output) break; } } - + return sname; } @@ -614,7 +614,7 @@ bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input) { /* exception for output node, only one input is actually used * depending on the current shader type */ - + if(input->flags() & SocketType::SVM_INTERNAL) return true; @@ -704,7 +704,7 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath) ss->Shader("displacement", name, id(node).c_str()); else assert(0); - + /* link inputs to other nodes */ foreach(ShaderInput *input, node->inputs) { if(input->link) { @@ -1250,4 +1250,3 @@ void OSLCompiler::parameter_color_array(const char * /*name*/, const array<float #endif /* WITH_OSL */ CCL_NAMESPACE_END - |