From 098ed3f15751b1e25f8a0149d49a78b2e1d3f881 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Nov 2024 07:37:30 -0500 Subject: Use a typedef for ports like other structs --- src/state.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 27be61c..e75ab3c 100644 --- a/src/state.c +++ b/src/state.c @@ -36,8 +36,8 @@ get_port_value(const char* port_symbol, uint32_t* size, uint32_t* type) { - Jalv* jalv = (Jalv*)user_data; - struct Port* port = jalv_port_by_symbol(jalv, port_symbol); + Jalv* const jalv = (Jalv*)user_data; + JalvPort* const port = jalv_port_by_symbol(jalv, port_symbol); if (port && port->flow == FLOW_INPUT && port->type == TYPE_CONTROL) { *size = sizeof(float); *type = jalv->forge.Float; @@ -124,8 +124,8 @@ set_port_value(const char* port_symbol, uint32_t ZIX_UNUSED(size), uint32_t type) { - Jalv* jalv = (Jalv*)user_data; - struct Port* port = jalv_port_by_symbol(jalv, port_symbol); + Jalv* const jalv = (Jalv*)user_data; + JalvPort* const port = jalv_port_by_symbol(jalv, port_symbol); if (!port) { jalv_log(JALV_LOG_ERR, "Preset port `%s' is missing\n", port_symbol); return; -- cgit v1.2.1