diff options
author | Robin Gareus <robin@gareus.org> | 2017-11-23 11:29:07 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-11-23 11:29:07 +0100 |
commit | a07bd2d5853aa7d383e325f0f5c1d88218e303c7 (patch) | |
tree | 542062d0a4bade8c6be861f9497247cad956eb13 /gtk2_ardour/processor_selection.h | |
parent | c59136813393d782260265bd2c8dc923fc04e238 (diff) |
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.
Diffstat (limited to 'gtk2_ardour/processor_selection.h')
-rw-r--r-- | gtk2_ardour/processor_selection.h | 5 |
1 files changed, 4 insertions, 1 deletions
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<void> 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); |