From 9d4f43fa7dc9075e2c9a557b57e99553c9a05a8d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 15 Nov 2014 18:53:53 -0500 Subject: Make ControlList::paste const-correct. --- libs/evoral/src/ControlList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/evoral/src/ControlList.cpp') 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; } -- cgit v1.2.3