-/**
- * Descends into node's hierarchy and sorts the children of each child according to their depth-index.
- * @param[in] node The node whose hierarchy to descend
- */
-void SortSiblingNodesRecursively(Node& node)
-{
- NodeContainer& container = node.GetChildren();
- std::sort(container.Begin(), container.End(), [](Node* a, Node* b) { return a->GetDepthIndex() < b->GetDepthIndex(); });
-
- // Descend tree and sort as well
- for(auto&& iter : container)
- {
- SortSiblingNodesRecursively(*iter);
- }
-}
-