From c617eee505464ff198e155ba59546db84d4c957b Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Wed, 4 Dec 2013 22:07:23 -0800 Subject: [PATCH] Uses the new Vector<>. Code is more robust! --- cocos/base/CCConsole.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 4994c46f59..e88afd17b5 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -68,11 +68,8 @@ static void printSceneGraph(int fd, Node* node, int level) mydprintf(fd, " %s: z=%d, tag=%d\n", node->description(), node->getZOrder(), node->getTag()); - auto children = node->getChildren(); - if( children ) { - for(const auto& child: *children) - printSceneGraph(fd, static_cast(child), level+1); - } + for(const auto& child: node->getChildren()) + printSceneGraph(fd, child, level+1); } static void printSceneGraphBoot(int fd)