Core/Commands: Refactor chat command internals to slightly reduce template bloat

* Replace std::enable_if with concept constraints
* Move code not dependent on template arguments out of template function bodies
* Reduce number of ChatCommandResult copies made during parsing
* Changed ChatCommandTable subcommands argument from std::vector<> const& to std::span<> and convert command definitions to arrays
* Allow ChatHandler arguments to be const
This commit is contained in:
Shauren
2026-03-27 20:02:12 +01:00
parent b81a6d122b
commit 4b6e6e1fec
55 changed files with 550 additions and 476 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class instance_commandscript : public CommandScript
public:
instance_commandscript() : CommandScript("instance_commandscript") { }
ChatCommandTable GetCommands() const override
std::span<ChatCommandBuilder const> GetCommands() const override
{
static ChatCommandTable instanceCommandTable =
{