diff --git a/source/includes/lv2_rdf.hpp b/source/includes/lv2_rdf.hpp index 3dbbbe508..f7b07e8f1 100644 --- a/source/includes/lv2_rdf.hpp +++ b/source/includes/lv2_rdf.hpp @@ -538,7 +538,7 @@ struct LV2_RDF_Parameter { } } - LV2_RDF_Parameter& operator=(LV2_RDF_Parameter& other) noexcept + void copyAndReplace(LV2_RDF_Parameter& other) noexcept { URI = other.URI; Type = other.Type; @@ -560,17 +560,9 @@ struct LV2_RDF_Parameter { other.Unit.Name = nullptr; other.Unit.Render = nullptr; other.Unit.Symbol = nullptr; - return *this; } -private: -#ifdef CARLA_PROPER_CPP11_SUPPORT - LV2_RDF_Parameter(LV2_RDF_Parameter&) = delete; - LV2_RDF_Parameter(const LV2_RDF_Parameter&) = delete; -#else - LV2_RDF_Parameter(LV2_RDF_Parameter&); - LV2_RDF_Parameter(const LV2_RDF_Parameter&); -#endif + CARLA_DECLARE_NON_COPY_STRUCT(LV2_RDF_Parameter) }; // Preset diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp index b6d157eee..e00cc5f27 100644 --- a/source/utils/CarlaLv2Utils.hpp +++ b/source/utils/CarlaLv2Utils.hpp @@ -2574,7 +2574,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool loadPresets) for (std::map::iterator it = parameters.begin(), end = parameters.end(); it != end; ++it) { - rdfDescriptor->Parameters[numUsed++] = it->second; + rdfDescriptor->Parameters[numUsed++].copyAndReplace(it->second); } }