From 27c2f843dad567ffcb753ce123602131d9ced8ea Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 19 Mar 2017 04:17:05 +0100 Subject: [PATCH] Commands: ensure the CommandDef is not messed up by copying ...better make it noncopyable to enforce the builder-style use. In the recent test, I observed strange behaviour when erroneously passing the CommandDef by value; the command seemed to be registered just fine, but afterwards, the registry was empty. I must admit I don't understand this, just from reading the code in CommandDef and Command it should work just fine to activate a copy of the originally started CommandDef; anyway, I didn't care to track that issue down, rather make the CommandDef noncopyable as it should have been right from start. --- src/proc/control/command-def.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/proc/control/command-def.hpp b/src/proc/control/command-def.hpp index f952cdc83..04805e789 100644 --- a/src/proc/control/command-def.hpp +++ b/src/proc/control/command-def.hpp @@ -71,6 +71,7 @@ #include #include +#include @@ -276,7 +277,8 @@ namespace control { * */ class CommandDef - : public lib::BoolCheckable + : public lib::BoolCheckable { Symbol id_; Command prototype_;