Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-10-24 13:26:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-10-24 13:26:12 +0300
commit48997d2e40a74a83fb9edfb9de0999139392f634 (patch)
treebb968328b736dd1f9f5433061d8cfbd10fb6ef9b /intern/cycles/render/graph.cpp
parent3f292596769d699c8347be075a6d4bff8fffd556 (diff)
Cycles: Cleanup, style
Diffstat (limited to 'intern/cycles/render/graph.cpp')
-rw-r--r--intern/cycles/render/graph.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index 131ec824be3..f6c83fb5c7e 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -148,8 +148,9 @@ void ShaderNode::attributes(Shader *shader, AttributeRequestSet *attributes)
bool ShaderNode::equals(const ShaderNode& other)
{
- if (type != other.type || bump != other.bump)
+ if(type != other.type || bump != other.bump) {
return false;
+ }
assert(inputs.size() == other.inputs.size());
@@ -597,13 +598,13 @@ void ShaderGraph::deduplicate_nodes()
/* Try to merge this node with another one. */
ShaderNode *merge_with = NULL;
foreach(ShaderNode *other_node, candidates[node->type->name]) {
- if (node != other_node && node->equals(*other_node)) {
+ if(node != other_node && node->equals(*other_node)) {
merge_with = other_node;
break;
}
}
/* If found an equivalent, merge; otherwise keep node for later merges */
- if (merge_with != NULL) {
+ if(merge_with != NULL) {
for(int i = 0; i < node->outputs.size(); ++i) {
relink(node, node->outputs[i], merge_with->outputs[i]);
}