Use comptime for fully declarative LV2 and Custom commands #14

Merged
luna merged 69 commits from declarative-commands into master 2020-06-02 21:37:47 +00:00
1 changed files with 1 additions and 11 deletions
Showing only changes of commit 36937a5fde - Show all commits

View File

@ -230,18 +230,8 @@ pub const Runner = struct {
.index = command.index,
};
var params = ParamMap.init(self.allocator);
defer params.deinit();
inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| {
_ = try params.put(
cmd_field.name,
@field(command.parameters, cmd_field.name),
);
}
var image = try self.getImage();
try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, &params);
try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, command.parameters);
}
fn newRunCommandSingle(