------------------------------------------ EcsController::TopologicalSort Adds systems to the schedule in a valid order according to their dependencies
| 762 | // Adds systems to the schedule in a valid order according to their dependencies |
| 763 | // |
| 764 | void EcsController::TopologicalSort(RegisteredSystem* const sys) |
| 765 | { |
| 766 | if (!sys->scheduled) |
| 767 | { |
| 768 | ET_ASSERT(!(sys->visited), "Circular dependency detected!"); |
| 769 | |
| 770 | sys->visited = true; |
| 771 | for (RegisteredSystem* const dep : sys->dependencies) |
| 772 | { |
| 773 | TopologicalSort(dep); |
| 774 | } |
| 775 | |
| 776 | sys->scheduled = true; |
| 777 | m_Schedule.emplace_back(sys); |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | |
| 782 | } // namespace fw |
nothing calls this directly
no outgoing calls
no test coverage detected