summaryrefslogtreecommitdiff
path: root/libs/evoral
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-17 19:43:09 -0500
committerDavid Robillard <d@drobilla.net>2014-12-17 19:43:09 -0500
commitd2cafbe95a5784b7c306c24b0008379a41a909f7 (patch)
tree03216b0bd933f4d774634a7f8e14965fcf79c990 /libs/evoral
parent6e912a0aa31313636e2957ec0aa97d4103ee117f (diff)
Remove some aborts that don't really need to be.
Enforce PatchPrimaryKey sanity at the type level rather than attempting to check for it everywhere. Remove dead file.
Diffstat (limited to 'libs/evoral')
-rw-r--r--libs/evoral/src/ControlList.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp
index 902a20980e..8176850428 100644
--- a/libs/evoral/src/ControlList.cpp
+++ b/libs/evoral/src/ControlList.cpp
@@ -331,7 +331,6 @@ ControlList::fast_simple_add (double when, double value)
Glib::Threads::Mutex::Lock lm (_lock);
/* to be used only for loading pre-sorted data from saved state */
_events.insert (_events.end(), new ControlEvent (when, value));
- assert(_events.back());
mark_dirty ();
}
@@ -1017,9 +1016,10 @@ ControlList::truncate_start (double overall_length)
double first_legal_value;
double first_legal_coordinate;
- assert(!_events.empty());
-
- if (overall_length == _events.back()->when) {
+ if (_events.empty()) {
+ /* nothing to truncate */
+ return;
+ } else if (overall_length == _events.back()->when) {
/* no change in overall length */
return;
}