summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/buffer_set.h2
-rw-r--r--libs/ardour/ardour/chan_mapping.h2
-rw-r--r--libs/ardour/ardour/comparable_shared_ptr.h2
-rw-r--r--libs/ardour/chan_mapping.cc16
4 files changed, 22 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
{