diff options
author | Carl Hetherington <carl@carlh.net> | 2011-05-17 12:00:10 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-05-17 12:00:10 +0000 |
commit | c86ccc7db28d8ed672a37d4637fec12d3a32d147 (patch) | |
tree | b861710270fdfb1eaa92ff36fde56ab4330f6dad /libs/evoral | |
parent | fb9b778fbc48b5edb32e47f0df6ff8dac161ac5d (diff) |
Minor tidy-ups.
git-svn-id: svn://localhost/ardour2/branches/3.0@9536 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/src/Sequence.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/evoral/src/Sequence.cpp b/libs/evoral/src/Sequence.cpp index 5842e35b92..7676268b73 100644 --- a/libs/evoral/src/Sequence.cpp +++ b/libs/evoral/src/Sequence.cpp @@ -75,12 +75,12 @@ Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t { DEBUG_TRACE (DEBUG::Sequence, string_compose ("Created Iterator @ %1 (is end: %2)\n)", t, _is_end)); - if (!_is_end) { - _lock = seq.read_lock(); - } else { + if (_is_end) { return; } + _lock = seq.read_lock(); + typename Sequence<Time>::ReadLock lock(seq.read_lock()); // Find first note which begins at or after t @@ -434,10 +434,11 @@ Sequence<Time>::const_iterator::operator=(const const_iterator& other) _force_discrete = other._force_discrete; _active_patch_change_message = other._active_patch_change_message; - if (other._lock) + if (other._lock) { _lock = _seq->read_lock(); - else + } else { _lock.reset(); + } if (other._control_iter == other._control_iters.end()) { _control_iter = _control_iters.end(); |