| 11 | } |
| 12 | |
| 13 | void GameModuleRegistry::Register(GameModuleInfo info) |
| 14 | { |
| 15 | auto& mods = Modules(); |
| 16 | // Replace if already registered (allows re-registration in tests) |
| 17 | for (auto& m : mods) |
| 18 | { |
| 19 | if (m.id == info.id) |
| 20 | { |
| 21 | m = std::move(info); |
| 22 | return; |
| 23 | } |
| 24 | } |
| 25 | mods.push_back(std::move(info)); |
| 26 | } |
| 27 | |
| 28 | bool GameModuleRegistry::IsRegistered(GameModuleId id) |
| 29 | { |
no outgoing calls
no test coverage detected