diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-09-09 20:31:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-09-09 20:31:43 +0000 |
commit | 696631f04e1a7eabc33b0c7823f64d011718e1ab (patch) | |
tree | 33c5713eef93a39ca446b6f07297b8fa8058ef2e | |
parent | 999ec4a074027fb092b5f053ec0825f959f1a311 (diff) |
comment tweaks from a second reading
git-svn-id: svn://localhost/ardour2/branches/3.0@13182 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index 907428af28..83222857ed 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -571,11 +571,12 @@ ControlList::add (double when, double value) if (!_events.empty()) { // avoid O(N) _events.size() here if (_events.back()->value == value) { EventList::iterator b = _events.end(); - --b; // last point, which we know exists - if (b != _events.begin()) { // step back again, which may not be possible - --b; // next-to-last-point + --b; // final point, which we know exists + if (b != _events.begin()) { // step back again, but check first that it is legal + --b; // penultimate-point if ((*b)->value == value) { - /* straight line - just move the last + /* there are at least two points with the exact same value ... + * straight line - just move the final * point to the new time */ _events.back()->when = when; |