mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15591 from mogemimi/prevent-shadow-warnings
Prevent variable shadowing warnings
This commit is contained in:
commit
81f37ab4ae
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue