| 21 | } // namespace |
| 22 | |
| 23 | void Register(const Command& cmd) |
| 24 | { |
| 25 | auto& r = Registry(); |
| 26 | for (const auto& existing : r) |
| 27 | { |
| 28 | if (std::string_view(existing.name) == std::string_view(cmd.name)) |
| 29 | { |
| 30 | LOG_WARN(Core, "DebugCommands: duplicate registration of '{}'", cmd.name); |
| 31 | return; |
| 32 | } |
| 33 | } |
| 34 | r.push_back(cmd); |
| 35 | } |
| 36 | |
| 37 | const Command* Find(std::string_view name) |
| 38 | { |
no outgoing calls
no test coverage detected