From 34856069f596fc5b88f496153f17c16047d4001a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 5 Dec 2018 18:06:45 +0100 Subject: core: add change command factory --- src/command.cpp | 5 +++++ src/command.hpp | 2 ++ src/wandac.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/command.cpp b/src/command.cpp index 05784b3..6831d5e 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -40,4 +40,9 @@ std::optional make_command(message message) return std::nullopt; } +command make_change_command() +{ + return {command_id::change}; +} + } // namespace wanda \ No newline at end of file diff --git a/src/command.hpp b/src/command.hpp index 54bf02d..5fac065 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -24,6 +24,8 @@ struct command std::optional make_command(message message); +command make_change_command(); + } // namespace wanda #endif \ No newline at end of file diff --git a/src/wandac.cpp b/src/wandac.cpp index 0f1d15d..6f57e96 100644 --- a/src/wandac.cpp +++ b/src/wandac.cpp @@ -60,7 +60,7 @@ struct listener : wanda::commander::listener { if (m_cli.command == "change") { - commander.send({wanda::command_id::change}); + commander.send(wanda::make_change_command()); commander.stop(); } } -- cgit v1.2.3