| 157 | } |
| 158 | |
| 159 | const aiNode *aiNode::FindNode(const char *name) const { |
| 160 | if (nullptr == name) { |
| 161 | return nullptr; |
| 162 | } |
| 163 | if (!::strcmp(mName.data, name)) { |
| 164 | return this; |
| 165 | } |
| 166 | for (unsigned int i = 0; i < mNumChildren; ++i) { |
| 167 | const aiNode *const p = mChildren[i]->FindNode(name); |
| 168 | if (p) { |
| 169 | return p; |
| 170 | } |
| 171 | } |
| 172 | // there is definitely no sub-node with this name |
| 173 | return nullptr; |
| 174 | } |
| 175 | |
| 176 | aiNode *aiNode::FindNode(const char *name) { |
| 177 | if (!::strcmp(mName.data, name)) return this; |
no outgoing calls
no test coverage detected