Skip to content

Commit 2d1c9dd

Browse files
committed
clap: Parameters -> UserParameters
1 parent a80658f commit 2d1c9dd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/clap/extensions/parameters.zig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const std = @import("std");
77

88
pub fn makeParameters(comptime Plugin: type) *const c.clap_plugin_params_t {
99
std.debug.assert(@hasDecl(Plugin, "Parameters"));
10-
const Parameters = Plugin.Parameters;
10+
const UserParameters = Plugin.Parameters;
1111

12-
comptime for (std.meta.fields(Parameters)) |field| {
12+
comptime for (std.meta.fields(UserParameters)) |field| {
1313
const name = switch (field.defaultValue().?) {
1414
inline else => |p| p.options.name,
1515
};
@@ -19,11 +19,11 @@ pub fn makeParameters(comptime Plugin: type) *const c.clap_plugin_params_t {
1919

2020
const parameters = struct {
2121
pub fn count(_: [*c]const c.clap_plugin_t) callconv(.c) u32 {
22-
return std.meta.fields(Parameters).len;
22+
return std.meta.fields(UserParameters).len;
2323
}
2424

2525
pub fn get_info(clap_plugin: [*c]const c.clap_plugin_t, index: u32, info: [*c]c.clap_param_info_t) callconv(.c) bool {
26-
if (index > std.meta.fields(Parameters).len)
26+
if (index > std.meta.fields(UserParameters).len)
2727
return false;
2828

2929
const state = clap.State.fromClap(clap_plugin);
@@ -59,7 +59,7 @@ pub fn makeParameters(comptime Plugin: type) *const c.clap_plugin_params_t {
5959
}
6060

6161
pub fn get_value(clap_plugin: [*c]const c.clap_plugin_t, id: c.clap_id, out: [*c]f64) callconv(.c) bool {
62-
if (id >= std.meta.fields(Parameters).len)
62+
if (id >= std.meta.fields(UserParameters).len)
6363
return false;
6464

6565
const state = clap.State.fromClap(clap_plugin);
@@ -72,7 +72,7 @@ pub fn makeParameters(comptime Plugin: type) *const c.clap_plugin_params_t {
7272
}
7373

7474
pub fn value_to_text(clap_plugin: [*c]const c.clap_plugin_t, id: c.clap_id, value: f64, out: [*c]u8, out_capacity: u32) callconv(.c) bool {
75-
if (id >= std.meta.fields(Parameters).len)
75+
if (id >= std.meta.fields(UserParameters).len)
7676
return false;
7777

7878
const state = clap.State.fromClap(clap_plugin);
@@ -108,7 +108,7 @@ pub fn makeParameters(comptime Plugin: type) *const c.clap_plugin_params_t {
108108
}
109109

110110
pub fn text_to_value(clap_plugin: [*c]const c.clap_plugin_t, id: c.clap_id, value_text: [*c]const u8, out: [*c]f64) callconv(.c) bool {
111-
if (id >= std.meta.fields(Parameters).len)
111+
if (id >= std.meta.fields(UserParameters).len)
112112
return false;
113113

114114
const state = clap.State.fromClap(clap_plugin);

0 commit comments

Comments
 (0)