diff options
author | David Robillard <d@drobilla.net> | 2013-12-24 16:49:44 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-24 16:49:44 +0000 |
commit | a6521f912b24bcf40c204303139eb2a104d5f85d (patch) | |
tree | fa101a658cc926b5387e9896667ca6658a5a62d1 /plugins/eg04-sampler.lv2 | |
parent | 391dd35265d03f3d4ebfcc2e2da28e2db6c75306 (diff) | |
download | lv2-a6521f912b24bcf40c204303139eb2a104d5f85d.tar.xz |
Fix several const violations.
Diffstat (limited to 'plugins/eg04-sampler.lv2')
-rw-r--r-- | plugins/eg04-sampler.lv2/sampler.c | 2 | ||||
-rw-r--r-- | plugins/eg04-sampler.lv2/sampler_ui.c | 8 | ||||
-rw-r--r-- | plugins/eg04-sampler.lv2/uris.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/eg04-sampler.lv2/sampler.c b/plugins/eg04-sampler.lv2/sampler.c index 9353d48..70f31c5 100644 --- a/plugins/eg04-sampler.lv2/sampler.c +++ b/plugins/eg04-sampler.lv2/sampler.c @@ -343,7 +343,7 @@ run(LV2_Handle instance, break; } } else if (is_object_type(uris, ev->body.type)) { - const LV2_Atom_Object* obj = (LV2_Atom_Object*)&ev->body; + const LV2_Atom_Object* obj = (const LV2_Atom_Object*)&ev->body; if (obj->body.otype == uris->patch_Set) { // Received a set message, send it to the worker. lv2_log_trace(&self->logger, "Queueing set message\n"); 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"); diff --git a/plugins/eg04-sampler.lv2/uris.h b/plugins/eg04-sampler.lv2/uris.h index e2ec6d0..1c00280 100644 --- a/plugins/eg04-sampler.lv2/uris.h +++ b/plugins/eg04-sampler.lv2/uris.h @@ -120,7 +120,7 @@ read_set_file(const SamplerURIs* uris, } else if (property->type != uris->atom_URID) { fprintf(stderr, "Malformed set message has non-URID property.\n"); return NULL; - } else if (((LV2_Atom_URID*)property)->body != uris->eg_sample) { + } else if (((const LV2_Atom_URID*)property)->body != uris->eg_sample) { fprintf(stderr, "Set message for unknown property.\n"); return NULL; } |