From f07966d5c11e0424f36113d77df3a34b270f73c5 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Tue, 28 Jul 2020 12:17:54 +0200 Subject: [PATCH] Fix CommandReturnType --- include/dynamic-graph/command-bind.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/dynamic-graph/command-bind.h b/include/dynamic-graph/command-bind.h index 6f1d5dc..7b3f373 100644 --- a/include/dynamic-graph/command-bind.h +++ b/include/dynamic-graph/command-bind.h @@ -400,8 +400,7 @@ struct CommandReturnType0 : public Command { protected: virtual Value doExecute() { assert(getParameterValues().size() == 0); - Value res; - res = fptr(); + Value res (fptr()); return res; } @@ -462,7 +461,7 @@ protected: assert(getParameterValues().size() == 1); T val = getParameterValues()[0].value(); Value res(fptr(val)); - return res; // void + return res; } private: @@ -528,8 +527,8 @@ protected: assert(getParameterValues().size() == 2); T1 val1 = getParameterValues()[0].value(); T2 val2 = getParameterValues()[1].value(); - fptr(val1, val2); - return Value(); // void + Value res(fptr(val1, val2)); + return res; } private: -- GitLab