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:
@@ -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 =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user