aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-24 19:00:43 +0200
committerDavid Robillard <d@drobilla.net>2018-09-24 19:08:41 +0200
commit46fbd9b6f9868dcc0770d1378e7654635900c196 (patch)
treeb1489b914cc61e302d853223e829d821e742dbd9 /src
parente9d44aaf8285901f2f95daf7eba7d08f72cdcc53 (diff)
downloadjalv-46fbd9b6f9868dcc0770d1378e7654635900c196.tar.gz
jalv-46fbd9b6f9868dcc0770d1378e7654635900c196.tar.bz2
jalv-46fbd9b6f9868dcc0770d1378e7654635900c196.zip
Fix some unnecessary const casts
Diffstat (limited to 'src')
-rw-r--r--src/jalv.c2
-rw-r--r--src/jalv_console.c2
-rw-r--r--src/jalv_gtk.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 732cea2..9cda82c 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -384,7 +384,7 @@ jalv_set_control(const ControlID* control,
Jalv* jalv = control->jalv;
if (control->type == PORT && type == jalv->forge.Float) {
struct Port* port = &control->jalv->ports[control->index];
- port->control = *(float*)body;
+ port->control = *(const float*)body;
} else if (control->type == PROPERTY) {
// Copy forge since it is used by process thread
LV2_Atom_Forge forge = jalv->forge;
diff --git a/src/jalv_console.c b/src/jalv_console.c
index 8ab7739..fb99a60 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -237,7 +237,7 @@ jalv_run_custom_ui(Jalv* jalv)
jalv_ui_instantiate(jalv, jalv_native_ui_type(), NULL);
idle_iface = (const LV2UI_Idle_Interface*)
suil_instance_extension_data(jalv->ui_instance, LV2_UI__idleInterface);
- show_iface = (LV2UI_Show_Interface*)
+ show_iface = (const LV2UI_Show_Interface*)
suil_instance_extension_data(jalv->ui_instance, LV2_UI__showInterface);
}
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index 44d25b4..f32c946 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -278,7 +278,7 @@ pset_menu_free(PresetMenu* menu)
static gint
menu_cmp(gconstpointer a, gconstpointer b, ZIX_UNUSED gpointer data)
{
- return strcmp(((PresetMenu*)a)->label, ((PresetMenu*)b)->label);
+ return strcmp(((const PresetMenu*)a)->label, ((const PresetMenu*)b)->label);
}
static PresetMenu*
@@ -1007,8 +1007,8 @@ add_control_row(GtkWidget* table,
static int
control_group_cmp(const void* p1, const void* p2, ZIX_UNUSED void* data)
{
- const ControlID* control1 = *(const ControlID**)p1;
- const ControlID* control2 = *(const ControlID**)p2;
+ const ControlID* control1 = *(const ControlID*const*)p1;
+ const ControlID* control2 = *(const ControlID*const*)p2;
const int cmp = (control1->group && control2->group)
? strcmp(lilv_node_as_string(control1->group),