diff options
author | David Robillard <d@drobilla.net> | 2014-11-15 18:53:53 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-16 22:35:45 -0500 |
commit | 9d4f43fa7dc9075e2c9a557b57e99553c9a05a8d (patch) | |
tree | d0f132d2e5fb9cb6867888a9de42e4ca636ef9e4 /libs/evoral | |
parent | 8793e60af2b0ad7e92babe48b2e5531199687af8 (diff) |
Make ControlList::paste const-correct.
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/evoral/ControlList.hpp | 2 | ||||
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp index debd4989e0..daa4aa93a6 100644 --- a/libs/evoral/evoral/ControlList.hpp +++ b/libs/evoral/evoral/ControlList.hpp @@ -139,7 +139,7 @@ public: boost::shared_ptr<ControlList> copy (double, double); void clear (double, double); - bool paste (ControlList&, double position, float times); + bool paste (const ControlList&, double position, float times); void set_yrange (double min, double max) { _min_yval = min; diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index deabd9d1cc..6717261713 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -1619,7 +1619,7 @@ ControlList::clear (double start, double end) /** @param pos Position in model coordinates */ bool -ControlList::paste (ControlList& alist, double pos, float /*times*/) +ControlList::paste (const ControlList& alist, double pos, float /*times*/) { if (alist._events.empty()) { return false; @@ -1634,7 +1634,7 @@ ControlList::paste (ControlList& alist, double pos, float /*times*/) where = upper_bound (_events.begin(), _events.end(), &cp, time_comparator); - for (iterator i = alist.begin();i != alist.end(); ++i) { + for (const_iterator i = alist.begin();i != alist.end(); ++i) { _events.insert (where, new ControlEvent( (*i)->when+pos,( *i)->value)); end = (*i)->when + pos; } |