| 1330 | } |
| 1331 | |
| 1332 | static void MoveAllUp(Collection* collection, Instance* instance) |
| 1333 | { |
| 1334 | /* |
| 1335 | * Move all children up in hierarchy |
| 1336 | */ |
| 1337 | |
| 1338 | uint32_t index = instance->m_FirstChildIndex; |
| 1339 | while (index != INVALID_INSTANCE_INDEX) |
| 1340 | { |
| 1341 | Instance* child = collection->m_Instances[index]; |
| 1342 | // NOTE: This assertion is only valid if we processes the tree depth first |
| 1343 | // The order of MoveAllUp and MoveUp below is imperative |
| 1344 | // NOTE: This assert is not possible when moving more than a single step. TODO: ? |
| 1345 | //assert(child->m_Depth == instance->m_Depth + 1); |
| 1346 | MoveAllUp(collection, child); |
| 1347 | MoveUp(collection, child); |
| 1348 | index = collection->m_Instances[index]->m_SiblingIndex; |
| 1349 | } |
| 1350 | } |
| 1351 | |
| 1352 | static void ReparentChildNodes(Collection* collection, HInstance instance) |
| 1353 | { |
no test coverage detected