From a07bd2d5853aa7d383e325f0f5c1d88218e303c7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 23 Nov 2017 11:29:07 +0100 Subject: Make static analysis happy.. If the copy c'tor of ProcessorSelection was actually used, assigning the XMLProcessorSelection processors = other.processors; would lead to duplicate free() of the XMLNode* XMLProcessorSelection would need a dedicated copy c'tor that duplicates allocates a new XMLNode. see also #10 at https://www.viva64.com/en/b/0540/ Anyway, the copy c'tor and assignment is never used. This commit makes this explicit. --- gtk2_ardour/processor_selection.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/processor_selection.h') diff --git a/gtk2_ardour/processor_selection.h b/gtk2_ardour/processor_selection.h index fc3a133ef1..7de1c4735e 100644 --- a/gtk2_ardour/processor_selection.h +++ b/gtk2_ardour/processor_selection.h @@ -67,7 +67,6 @@ class ProcessorSelection : public PBD::ScopedConnectionList, public sigc::tracka XMLProcessorSelection processors; sigc::signal ProcessorsChanged; - ProcessorSelection& operator= (const ProcessorSelection& other); void clear (); bool empty(); @@ -76,6 +75,10 @@ class ProcessorSelection : public PBD::ScopedConnectionList, public sigc::tracka void add (XMLNode* node); void clear_processors (); + + private: + ProcessorSelection& operator= (const ProcessorSelection& other); + ProcessorSelection (ProcessorSelection const&); }; bool operator==(const ProcessorSelection& a, const ProcessorSelection& b); -- cgit v1.2.3