mirror of https://github.com/axmolengine/axmol.git
code adjust
This commit is contained in:
parent
ca0afcfa92
commit
49052ab28d
|
@ -38,7 +38,6 @@ AttachNode* AttachNode::create(Bone3D* attachBone)
|
|||
auto attachnode = new AttachNode();
|
||||
attachnode->_attachBone = attachBone;
|
||||
attachnode->autorelease();
|
||||
|
||||
return attachnode;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,12 +138,12 @@ Bone3D* MeshSkin::getBoneByIndex(unsigned int index) const
|
|||
Bone3D* MeshSkin::getBoneByName(const std::string& id) const
|
||||
{
|
||||
//search from skin bones
|
||||
for (auto it : _skinBones) {
|
||||
for (const auto& it : _skinBones) {
|
||||
if (it->getName() == id)
|
||||
return it;
|
||||
}
|
||||
//search from node bones
|
||||
for (auto it : _nodeBones) {
|
||||
for (const auto& it : _nodeBones) {
|
||||
if (it->getName() == id )
|
||||
return it;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue