From a6521f912b24bcf40c204303139eb2a104d5f85d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Dec 2013 16:49:44 +0000 Subject: Fix several const violations. --- plugins/eg04-sampler.lv2/sampler_ui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/eg04-sampler.lv2/sampler_ui.c') diff --git a/plugins/eg04-sampler.lv2/sampler_ui.c b/plugins/eg04-sampler.lv2/sampler_ui.c index 40922ae..2184fbf 100644 --- a/plugins/eg04-sampler.lv2/sampler_ui.c +++ b/plugins/eg04-sampler.lv2/sampler_ui.c @@ -155,16 +155,16 @@ port_event(LV2UI_Handle handle, { SamplerUI* ui = (SamplerUI*)handle; if (format == ui->uris.atom_eventTransfer) { - LV2_Atom* atom = (LV2_Atom*)buffer; + const LV2_Atom* atom = (const LV2_Atom*)buffer; if (atom->type == ui->uris.atom_Blank) { - LV2_Atom_Object* obj = (LV2_Atom_Object*)atom; - const LV2_Atom* file_uri = read_set_file(&ui->uris, obj); + const LV2_Atom_Object* obj = (const LV2_Atom_Object*)atom; + const LV2_Atom* file_uri = read_set_file(&ui->uris, obj); if (!file_uri) { fprintf(stderr, "Unknown message sent to UI.\n"); return; } - const char* uri = (const char*)LV2_ATOM_BODY(file_uri); + const char* uri = (const char*)LV2_ATOM_BODY_CONST(file_uri); gtk_label_set_text(GTK_LABEL(ui->label), uri); } else { fprintf(stderr, "Unknown message type.\n"); -- cgit v1.2.1