diff options
-rw-r--r-- | libs/ardour/ardour/buffer_set.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/chan_mapping.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/comparable_shared_ptr.h | 2 | ||||
-rw-r--r-- | libs/ardour/chan_mapping.cc | 16 | ||||
-rw-r--r-- | libs/midi++2/midi++/midnam_patch.h | 5 | ||||
-rw-r--r-- | libs/pbd/pbd/properties.h | 5 | ||||
-rw-r--r-- | libs/surfaces/contourdesign/contourdesign.h | 6 | ||||
-rw-r--r-- | libs/temporal/temporal/beats.h | 1 |
8 files changed, 39 insertions, 0 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 85041b6728..3a4b9c8344 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -144,6 +144,8 @@ public: template <typename BS, typename B> class iterator_base { public: + iterator_base(const iterator_base& other) + : _set(other._set), _type(other._type), _index(other._index) {} B& operator*() { return (B&)_set.get_available(_type, _index); } B* operator->() { return &(B&)_set.get_available(_type, _index); } iterator_base<BS,B>& operator++() { ++_index; return *this; } // yes, prefix only diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index e73c009b58..64ffc32890 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -45,6 +45,8 @@ public: ChanMapping(const ChanMapping&); ChanMapping(const XMLNode& node); + ChanMapping operator=(const ChanMapping&); + uint32_t get(DataType t, uint32_t from, bool* valid) const; /** reverse lookup diff --git a/libs/ardour/ardour/comparable_shared_ptr.h b/libs/ardour/ardour/comparable_shared_ptr.h index 37c1224a54..32cdfc21a2 100644 --- a/libs/ardour/ardour/comparable_shared_ptr.h +++ b/libs/ardour/ardour/comparable_shared_ptr.h @@ -42,6 +42,8 @@ class /*LIBARDOUR_API*/ ComparableSharedPtr : public boost::shared_ptr<T> ComparableSharedPtr (ComparableSharedPtr const & r) : boost::shared_ptr<T> (r) {} + ComparableSharedPtr& operator=(const ComparableSharedPtr& r) { *this = r; return *this; } + template<class Y> ComparableSharedPtr(ComparableSharedPtr<Y> const & r) : boost::shared_ptr<T> (r) {} diff --git a/libs/ardour/chan_mapping.cc b/libs/ardour/chan_mapping.cc index 3ccc92d42a..d907efe732 100644 --- a/libs/ardour/chan_mapping.cc +++ b/libs/ardour/chan_mapping.cc @@ -67,6 +67,22 @@ ChanMapping::ChanMapping (const XMLNode& node) } } + +ChanMapping ChanMapping::operator=(const ChanMapping& other) +{ + _mappings.clear(); + + const ChanMapping::Mappings& mp (other.mappings()); + for (Mappings::const_iterator tm = mp.begin(); tm != mp.end(); ++tm) { + for (TypeMapping::const_iterator i = tm->second.begin(); i != tm->second.end(); ++i) { + set (tm->first, i->first, i->second); + } + } + + _mappings = other._mappings; + return *this; +} + uint32_t ChanMapping::get(DataType t, uint32_t from, bool* valid) const { diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index e24ba169b5..d95a9e1ff0 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -52,6 +52,11 @@ public: , _program(std::max(0, std::min(program_num, 127))) {} + inline PatchPrimaryKey(const PatchPrimaryKey& id) + : _bank(id._bank) + , _program(id._program) + {} + inline PatchPrimaryKey& operator=(const PatchPrimaryKey& id) { _bank = id._bank; _program = id._program; diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index 37e40bf2b2..5e3412ebf0 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -253,6 +253,11 @@ public: return this->_current; } + Property<T>& operator=(Property<T> const& v) { + this->set (v); + return *this; + } + private: friend class PropertyFactory; diff --git a/libs/surfaces/contourdesign/contourdesign.h b/libs/surfaces/contourdesign/contourdesign.h index c1d6ad9bcc..f24da723da 100644 --- a/libs/surfaces/contourdesign/contourdesign.h +++ b/libs/surfaces/contourdesign/contourdesign.h @@ -53,6 +53,12 @@ struct JumpDistance { JumpDistance () : value (1.0), unit (BEATS) {} JumpDistance (double v, JumpUnit u) : value (v), unit (u) {} JumpDistance (const JumpDistance& o) : value (o.value), unit (o.unit) {} + JumpDistance& operator= (const JumpDistance& o) { + value = o.value; + unit = o.unit; + return *this; + } + double value; JumpUnit unit; }; diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index b874402e2f..4aed64094a 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -37,6 +37,7 @@ public: LIBTEMPORAL_API static const int32_t PPQN = 1920; Beats() : _beats(0), _ticks(0) {} + Beats(const Beats& other) : _beats(other._beats), _ticks(other._ticks) {} /** Normalize so ticks is within PPQN. */ void normalize() { |