Merge pull request #15591 from mogemimi/prevent-shadow-warnings

Prevent variable shadowing warnings
This commit is contained in:
minggo 2016-05-09 14:59:23 +08:00
commit 81f37ab4ae
1 changed files with 10 additions and 6 deletions

View File

@ -338,9 +338,11 @@ Node* findChild(Node* levelRoot, const char* name)
return nullptr;
// Find this node
auto target = levelRoot->getChildByName(name);
if (target != nullptr)
return target;
{
auto target = levelRoot->getChildByName(name);
if (target != nullptr)
return target;
}
// Find recursively
for (auto& child : levelRoot->getChildren())
@ -358,9 +360,11 @@ Node* findChild(Node* levelRoot, int tag)
return nullptr;
// Find this node
auto target = levelRoot->getChildByTag(tag);
if (target != nullptr)
return target;
{
auto target = levelRoot->getChildByTag(tag);
if (target != nullptr)
return target;
}
// Find recursively
for (auto& child : levelRoot->getChildren())