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:
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph/NodeGroup.cpp')
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeGroup.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
index 7ea495c4166..4bbb4a6c58a 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
@@ -27,8 +27,9 @@ namespace Freestyle {
void NodeGroup::AddChild(Node *iChild)
{
- if (NULL == iChild)
+ if (NULL == iChild) {
return;
+ }
_Children.push_back(iChild);
iChild->addRef();
@@ -44,8 +45,9 @@ int NodeGroup::destroy()
int refThis = Node::destroy();
// if refThis != 0, we can't destroy the tree
- if (0 != refThis)
+ if (0 != refThis) {
return refThis;
+ }
// If we are here, that means that nobody else needs our NodeGroup and we can destroy it.
int refCount = 0;
@@ -53,8 +55,9 @@ int NodeGroup::destroy()
for (node = _Children.begin(); node != _Children.end(); ++node) {
refCount = (*node)->destroy();
- if (0 == refCount)
+ if (0 == refCount) {
delete (*node);
+ }
}
_Children.clear();
@@ -68,8 +71,9 @@ void NodeGroup::accept(SceneVisitor &v)
v.visitNodeGroupBefore(*this);
for (vector<Node *>::iterator node = _Children.begin(), end = _Children.end(); node != end;
- ++node)
+ ++node) {
(*node)->accept(v);
+ }
v.visitNodeGroupAfter(*this);
}