diff --git a/source/backend/plugin/DssiPlugin.cpp b/source/backend/plugin/DssiPlugin.cpp index 48f54b51d..51fc619fb 100644 --- a/source/backend/plugin/DssiPlugin.cpp +++ b/source/backend/plugin/DssiPlugin.cpp @@ -2003,7 +2003,7 @@ private: for (LinkedList::Itenerator it = sMultiSynthList.begin(); it.valid(); it.next()) { - const char*& itLabel(it.getValue()); + const char* const itLabel(it.getValue()); if (std::strcmp(label, itLabel) == 0) return false; diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/Lv2Plugin.cpp index ce85cd4a3..aeb9e8e94 100644 --- a/source/backend/plugin/Lv2Plugin.cpp +++ b/source/backend/plugin/Lv2Plugin.cpp @@ -520,13 +520,10 @@ public: for (LinkedList::Itenerator it = fCustomURIDs.begin(); it.valid(); it.next()) { - const char*& uri(it.getValue()); + const char* const uri(it.getValue()); if (uri != nullptr) - { delete[] uri; - uri = nullptr; - } } fCustomURIDs.clear(); @@ -3850,7 +3847,7 @@ public: for (size_t i=0; i < fCustomURIDs.count(); ++i) { - const char*& thisUri(fCustomURIDs.getAt(i)); + const char* const thisUri(fCustomURIDs.getAt(i)); if (thisUri != nullptr && std::strcmp(thisUri, uri) == 0) return static_cast(i); } diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp index 6a46df3cf..2005abe2a 100644 --- a/source/bridges/CarlaBridgeUI-LV2.cpp +++ b/source/bridges/CarlaBridgeUI-LV2.cpp @@ -327,13 +327,10 @@ public: for (LinkedList::Itenerator it = fCustomURIDs.begin(); it.valid(); it.next()) { - const char*& uri(it.getValue()); + const char* const uri(it.getValue()); if (uri != nullptr) - { delete[] uri; - uri = nullptr; - } } fCustomURIDs.clear(); @@ -566,7 +563,7 @@ public: for (size_t i=0; i < fCustomURIDs.count(); ++i) { - const char*& thisUri(fCustomURIDs.getAt(i)); + const char* const thisUri(fCustomURIDs.getAt(i)); if (thisUri != nullptr && std::strcmp(thisUri, uri) == 0) return i; } diff --git a/source/modules/native-plugins/zynaddsubfx-synth.cpp b/source/modules/native-plugins/zynaddsubfx-synth.cpp index 88fbc1b51..ee077d114 100644 --- a/source/modules/native-plugins/zynaddsubfx-synth.cpp +++ b/source/modules/native-plugins/zynaddsubfx-synth.cpp @@ -176,7 +176,7 @@ public: if (index >= fPrograms.count()) return nullptr; - const ProgramInfo*& pInfo(fPrograms.getAt(index)); + const ProgramInfo* const pInfo(fPrograms.getAt(index)); fRetProgram.bank = pInfo->bank; fRetProgram.program = pInfo->prog; diff --git a/source/plugin/carla-native-base.cpp b/source/plugin/carla-native-base.cpp index e0709992a..19ec56931 100644 --- a/source/plugin/carla-native-base.cpp +++ b/source/plugin/carla-native-base.cpp @@ -59,7 +59,7 @@ struct PluginListManager { #ifdef CARLA_NATIVE_PLUGIN_LV2 for (LinkedList::Itenerator it = lv2Descs.begin(); it.valid(); it.next()) { - const LV2_Descriptor*& lv2Desc(it.getValue()); + const LV2_Descriptor* const lv2Desc(it.getValue()); delete[] lv2Desc->URI; delete lv2Desc; } diff --git a/source/plugin/carla-native-lv2.cpp b/source/plugin/carla-native-lv2.cpp index 911dd42ad..b67eb9c19 100644 --- a/source/plugin/carla-native-lv2.cpp +++ b/source/plugin/carla-native-lv2.cpp @@ -1399,7 +1399,7 @@ const LV2_Descriptor* lv2_descriptor(uint32_t index) return plm.lv2Descs.getAt(index); } - const NativePluginDescriptor*& pluginDesc(plm.descs.getAt(index)); + const NativePluginDescriptor* const pluginDesc(plm.descs.getAt(index)); CarlaString tmpURI;