mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 17:46:34 +01:00
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.
This commit is contained in:
parent
c591368133
commit
a07bd2d585
4 changed files with 7 additions and 23 deletions
|
|
@ -18,16 +18,6 @@
|
||||||
|
|
||||||
#include "processor_selection.h"
|
#include "processor_selection.h"
|
||||||
|
|
||||||
ProcessorSelection&
|
|
||||||
ProcessorSelection::operator= (ProcessorSelection const & other)
|
|
||||||
{
|
|
||||||
if (this != &other) {
|
|
||||||
processors = other.processors;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessorSelection::clear_processors ()
|
ProcessorSelection::clear_processors ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ class ProcessorSelection : public PBD::ScopedConnectionList, public sigc::tracka
|
||||||
XMLProcessorSelection processors;
|
XMLProcessorSelection processors;
|
||||||
sigc::signal<void> ProcessorsChanged;
|
sigc::signal<void> ProcessorsChanged;
|
||||||
|
|
||||||
ProcessorSelection& operator= (const ProcessorSelection& other);
|
|
||||||
|
|
||||||
void clear ();
|
void clear ();
|
||||||
bool empty();
|
bool empty();
|
||||||
|
|
@ -76,6 +75,10 @@ class ProcessorSelection : public PBD::ScopedConnectionList, public sigc::tracka
|
||||||
void add (XMLNode* node);
|
void add (XMLNode* node);
|
||||||
|
|
||||||
void clear_processors ();
|
void clear_processors ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
ProcessorSelection& operator= (const ProcessorSelection& other);
|
||||||
|
ProcessorSelection (ProcessorSelection const&);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator==(const ProcessorSelection& a, const ProcessorSelection& b);
|
bool operator==(const ProcessorSelection& a, const ProcessorSelection& b);
|
||||||
|
|
|
||||||
|
|
@ -43,16 +43,6 @@ RouteProcessorSelection::RouteProcessorSelection (SessionHandlePtr& s, AxisViewP
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RouteProcessorSelection&
|
|
||||||
RouteProcessorSelection::operator= (const RouteProcessorSelection& other)
|
|
||||||
{
|
|
||||||
if (&other != this) {
|
|
||||||
(*((ProcessorSelection*) this)) = (*((ProcessorSelection const *) &other));
|
|
||||||
axes = other.axes;
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
operator== (const RouteProcessorSelection& a, const RouteProcessorSelection& b)
|
operator== (const RouteProcessorSelection& a, const RouteProcessorSelection& b)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,6 @@ public:
|
||||||
|
|
||||||
RouteProcessorSelection (ARDOUR::SessionHandlePtr&, AxisViewProvider&);
|
RouteProcessorSelection (ARDOUR::SessionHandlePtr&, AxisViewProvider&);
|
||||||
|
|
||||||
RouteProcessorSelection& operator= (const RouteProcessorSelection& other);
|
|
||||||
|
|
||||||
void clear ();
|
void clear ();
|
||||||
bool empty();
|
bool empty();
|
||||||
|
|
||||||
|
|
@ -58,6 +56,9 @@ private:
|
||||||
AxisViewProvider& avp;
|
AxisViewProvider& avp;
|
||||||
void removed (AxisView*);
|
void removed (AxisView*);
|
||||||
std::list<AxisView*> add_grouped_tracks (AxisView*) const;
|
std::list<AxisView*> add_grouped_tracks (AxisView*) const;
|
||||||
|
|
||||||
|
RouteProcessorSelection& operator= (const RouteProcessorSelection& other);
|
||||||
|
RouteProcessorSelection (RouteProcessorSelection const&);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator==(const RouteProcessorSelection& a, const RouteProcessorSelection& b);
|
bool operator==(const RouteProcessorSelection& a, const RouteProcessorSelection& b);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue