mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Make ControlList::paste const-correct.
This commit is contained in:
parent
8793e60af2
commit
9d4f43fa7d
2 changed files with 3 additions and 3 deletions
|
|
@ -139,7 +139,7 @@ public:
|
||||||
boost::shared_ptr<ControlList> copy (double, double);
|
boost::shared_ptr<ControlList> copy (double, double);
|
||||||
void clear (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) {
|
void set_yrange (double min, double max) {
|
||||||
_min_yval = min;
|
_min_yval = min;
|
||||||
|
|
|
||||||
|
|
@ -1619,7 +1619,7 @@ ControlList::clear (double start, double end)
|
||||||
|
|
||||||
/** @param pos Position in model coordinates */
|
/** @param pos Position in model coordinates */
|
||||||
bool
|
bool
|
||||||
ControlList::paste (ControlList& alist, double pos, float /*times*/)
|
ControlList::paste (const ControlList& alist, double pos, float /*times*/)
|
||||||
{
|
{
|
||||||
if (alist._events.empty()) {
|
if (alist._events.empty()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1634,7 +1634,7 @@ ControlList::paste (ControlList& alist, double pos, float /*times*/)
|
||||||
|
|
||||||
where = upper_bound (_events.begin(), _events.end(), &cp, time_comparator);
|
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));
|
_events.insert (where, new ControlEvent( (*i)->when+pos,( *i)->value));
|
||||||
end = (*i)->when + pos;
|
end = (*i)->when + pos;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue