Avoid variable shadowing (#17264)

This commit is contained in:
mogemimi 2017-02-04 11:37:37 +09:00 committed by minggo
parent 1d47ae7e90
commit ccf6b99b6d
1 changed files with 2 additions and 2 deletions

View File

@ -199,12 +199,12 @@ bool Sprite3D::loadFromCache(const std::string& path)
_skeleton = Skeleton3D::create(spritedata->nodedatas->skeleton);
CC_SAFE_RETAIN(_skeleton);
auto size = spritedata->nodedatas->nodes.size();
const bool singleSprite = (spritedata->nodedatas->nodes.size() == 1);
for(const auto& it : spritedata->nodedatas->nodes)
{
if(it)
{
createNode(it, this, *(spritedata->materialdatas), size == 1);
createNode(it, this, *(spritedata->materialdatas), singleSprite);
}
}