diff options
author | David Robillard <d@drobilla.net> | 2016-07-31 17:57:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-07-31 17:57:55 -0400 |
commit | e2f90ca5d3e2f59fa3f5f7a104048efb7f7fc099 (patch) | |
tree | c788a8d8c043e8b9877a4055508eb5871b4ba0ce /plugins | |
parent | 2389e2a8781ce5b346ddacccb2a61b1da2cd8aab (diff) | |
download | lv2-e2f90ca5d3e2f59fa3f5f7a104048efb7f7fc099.tar.xz |
Fix compilation with C++
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/eg-params.lv2/params.c | 2 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/sampler.c | 4 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/uris.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/eg-params.lv2/params.c b/plugins/eg-params.lv2/params.c index 06def6e..3a45061 100644 --- a/plugins/eg-params.lv2/params.c +++ b/plugins/eg-params.lv2/params.c @@ -351,7 +351,7 @@ write_param_to_forge(LV2_State_Handle handle, uint32_t type, uint32_t flags) { - LV2_Atom_Forge* forge = handle; + LV2_Atom_Forge* forge = (LV2_Atom_Forge*)handle; if (!lv2_atom_forge_key(forge, key) || !lv2_atom_forge_atom(forge, size, type) || diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index 1557656..36acb2f 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -121,7 +121,7 @@ load_sample(LV2_Log_Logger* logger, const char* path) } // Read data - float* const data = malloc(sizeof(float) * info->frames); + float* const data = (float*)malloc(sizeof(float) * info->frames); if (!data) { lv2_log_error(logger, "Failed to allocate memory for sample\n"); return NULL; @@ -431,7 +431,7 @@ save(LV2_Handle instance, return LV2_STATE_SUCCESS; } - LV2_State_Map_Path* map_path = lv2_features_data( + LV2_State_Map_Path* map_path = (LV2_State_Map_Path*)lv2_features_data( features, LV2_STATE__mapPath); if (!map_path) { return LV2_STATE_ERR_NO_FEATURE; diff --git a/plugins/eg-sampler.lv2/uris.h b/plugins/eg-sampler.lv2/uris.h index fe0497f..ceeddc0 100644 --- a/plugins/eg-sampler.lv2/uris.h +++ b/plugins/eg-sampler.lv2/uris.h @@ -133,7 +133,7 @@ read_set_file(const SamplerURIs* uris, return NULL; } - return LV2_ATOM_BODY_CONST(value); + return (const char*)LV2_ATOM_BODY_CONST(value); } #endif /* SAMPLER_URIS_H */ |