diff options
author | Niklas Halle <niklas@niklashalle.net> | 2020-08-28 20:22:40 +0200 |
---|---|---|
committer | Niklas Halle <niklas@niklashalle.net> | 2020-08-28 20:22:40 +0200 |
commit | 7a03c9340b6b53c2505c7cd26fa3aede0cf14603 (patch) | |
tree | 34fd1f2ce8eb73e0492edb5370f25022eb66d5eb /include/Handler.hpp | |
parent | da8246e8efece2397440a59c6011c4f832baa7b8 (diff) | |
download | n_core-7a03c9340b6b53c2505c7cd26fa3aede0cf14603.tar.gz n_core-7a03c9340b6b53c2505c7cd26fa3aede0cf14603.zip |
triesfeature/fix_help
Diffstat (limited to 'include/Handler.hpp')
-rw-r--r-- | include/Handler.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/Handler.hpp b/include/Handler.hpp index 1ae84d1..c22abe5 100644 --- a/include/Handler.hpp +++ b/include/Handler.hpp @@ -14,20 +14,15 @@ namespace Handler { typedef std::function<std::vector<json>()> description_function; struct CommandHandler { - CommandHandler(std::string command, handler_function *func, description_function *desc, void *payload = nullptr); + CommandHandler(std::string command, handler_function func, description_function desc, void *payload = nullptr); - CommandHandler(CommandHandler &&o) noexcept { - command = std::move(o.command); - func = std::move(o.func); - get_description = std::move(get_description); - payload = o.payload; - }; + CommandHandler(CommandHandler &&o) noexcept; [[nodiscard]] json exec(std::string const &arguments, std::string const &session) const; std::string command; - handler_function *func{nullptr}; - description_function *get_description{nullptr}; + handler_function func{nullptr}; + description_function get_description{nullptr}; void *payload{nullptr}; }; |