Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
This commit is contained in:
@@ -435,7 +435,8 @@ template <Commands Tcmd> struct CommandTraits;
|
||||
|
||||
#define DEF_CMD_TRAIT(cmd_, proc_, flags_, type_) \
|
||||
template<> struct CommandTraits<cmd_> { \
|
||||
using Args = typename CommandFunctionTraitHelper<decltype(&proc_)>::Args; \
|
||||
using ProcType = decltype(&proc_); \
|
||||
using Args = typename CommandFunctionTraitHelper<ProcType>::Args; \
|
||||
static constexpr Commands cmd = cmd_; \
|
||||
static constexpr auto &proc = proc_; \
|
||||
static constexpr CommandFlags flags = (CommandFlags)(flags_); \
|
||||
|
Reference in New Issue
Block a user