mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
Fix reliance on deprecated implicit assignment operators
Either both, or neither, a copy constructor and assignment operator should be defined. This fixes Wdeprecated-copy warnings.
This commit is contained in:
parent
91f15300b8
commit
0404876d7b
3 changed files with 6 additions and 3 deletions
|
|
@ -746,17 +746,19 @@ enum MidiPortFlags {
|
||||||
|
|
||||||
struct LatencyRange {
|
struct LatencyRange {
|
||||||
LatencyRange () : min (0), max (0) {}
|
LatencyRange () : min (0), max (0) {}
|
||||||
|
LatencyRange (const LatencyRange& other) : min (other.min), max (other.max) {}
|
||||||
|
|
||||||
uint32_t min; //< samples
|
uint32_t min; //< samples
|
||||||
uint32_t max; //< samples
|
uint32_t max; //< samples
|
||||||
|
|
||||||
bool operator==(const LatencyRange& other) {
|
bool operator==(const LatencyRange& other) const {
|
||||||
return (min == other.min && max == other.max);
|
return (min == other.min && max == other.max);
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator=(const LatencyRange& other) {
|
LatencyRange& operator=(const LatencyRange& other) {
|
||||||
min = other.min;
|
min = other.min;
|
||||||
max = other.max;
|
max = other.max;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ Region::Region (boost::shared_ptr<const Region> other)
|
||||||
use_sources (other->_sources);
|
use_sources (other->_sources);
|
||||||
set_master_sources (other->_master_sources);
|
set_master_sources (other->_master_sources);
|
||||||
|
|
||||||
_position_lock_style = other->_position_lock_style;
|
_position_lock_style = other->_position_lock_style.val();
|
||||||
_first_edit = other->_first_edit;
|
_first_edit = other->_first_edit;
|
||||||
|
|
||||||
_start = other->_start;
|
_start = other->_start;
|
||||||
|
|
|
||||||
|
|
@ -343,6 +343,7 @@ private:
|
||||||
|
|
||||||
/* no copy-construction */
|
/* no copy-construction */
|
||||||
EnumProperty (EnumProperty const &);
|
EnumProperty (EnumProperty const &);
|
||||||
|
EnumProperty& operator= (EnumProperty const &);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A Property which holds a shared_ptr to a Stateful object,
|
/** A Property which holds a shared_ptr to a Stateful object,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue