better use a named magic constant

right now, what we actually need here is just some integer,
so the GenNode payload is typed to int (or just to anything
different than a Record, because the Record signals that
we intend to bind, not to invoke the command)
This commit is contained in:
Fischlurch 2016-02-11 15:47:16 +01:00
parent fea6628b3c
commit 0964e56c49
2 changed files with 10 additions and 7 deletions

View file

@ -52,11 +52,6 @@
#include <string>
/** @todo unused as of 11/2015
* some additional instantiation metadata
* could be passed alongside with the invocation.
*/
#define RESERVED_FOR_FUTURE_USE_ 42
namespace gui {
@ -103,9 +98,17 @@ namespace interact {
GenNode bang() const
{
return GenNode(cmdID_, RESERVED_FOR_FUTURE_USE_);
return GenNode(cmdID_, int(DO_IT));
}
/** @todo unused as of 11/2015
* some additional instantiation metadata
* could be passed alongside with the invocation. */
enum { DO_IT = 42 };
string
getID() const
{

View file

@ -344,7 +344,7 @@ namespace test {
CHECK (dummyState == concreteParam); // command was indeed invoked
CHECK (nexusLog.verifyCall("act").arg("«int»|" +toString(concreteParam))
.beforeCall("act").arg("DataCap|«int»|"));
.beforeCall("act").arg("DataCap|«int»|" +toString(int(InvocationTrail::DO_IT))));
CHECK (nexusLog.verifyEvent("binding for command \""+DUMMY_CMD_ID)
.beforeEvent("invoke command \""+DUMMY_CMD_ID));