Skip to content

Commit f07966d

Browse files
jmirabelnim65s
authored andcommitted
Fix CommandReturnType
1 parent 675d7e3 commit f07966d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

include/dynamic-graph/command-bind.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,7 @@ struct CommandReturnType0 : public Command {
400400
protected:
401401
virtual Value doExecute() {
402402
assert(getParameterValues().size() == 0);
403-
Value res;
404-
res = fptr();
403+
Value res (fptr());
405404
return res;
406405
}
407406

@@ -462,7 +461,7 @@ struct CommandReturnType1 : public Command {
462461
assert(getParameterValues().size() == 1);
463462
T val = getParameterValues()[0].value();
464463
Value res(fptr(val));
465-
return res; // void
464+
return res;
466465
}
467466

468467
private:
@@ -528,8 +527,8 @@ struct CommandReturnType2 : public Command {
528527
assert(getParameterValues().size() == 2);
529528
T1 val1 = getParameterValues()[0].value();
530529
T2 val2 = getParameterValues()[1].value();
531-
fptr(val1, val2);
532-
return Value(); // void
530+
Value res(fptr(val1, val2));
531+
return res;
533532
}
534533

535534
private:

0 commit comments

Comments
 (0)