* Sequence: added asserts

* sequence.cpp completed first test


git-svn-id: svn://localhost/ardour2/branches/3.0@4504 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Hans Baier 2009-02-09 08:49:57 +00:00
parent fcfe073b00
commit 9734fa3e93
3 changed files with 28 additions and 10 deletions

View file

@ -219,6 +219,8 @@ Sequence<T>::const_iterator::const_iterator(const Sequence<T>& seq, T t)
debugout << " : " << hex << (int)((MIDIEvent<T>*)_event.get())->type();
debugout << " @ " << _event->time() << endl;
}
assert(_event && _event->size() > 0);
//assert(_is_end || (_event->buffer() && _event->buffer()[0] != '\0'));
}
@ -240,7 +242,7 @@ Sequence<T>::const_iterator::operator++()
}
debugout << "Iterator ++" << endl;
assert(_event->buffer() && _event->size() > 0);
assert(_event && _event->buffer() && _event->size() > 0);
const MIDIEvent<T>& ev = *((MIDIEvent<T>*)_event.get());