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;
/** @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;
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;
}