diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-03 18:43:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-03 18:43:58 +0000 |
commit | 2a200bdc0ead3d2a2a0481db44b0bc080529aa69 (patch) | |
tree | 2dc854572ed60513668647c2416707c89c68c3ea /libs/ardour/tempo.cc | |
parent | 0d4658e0afb35329fe4ba135a20df92691f8b639 (diff) |
return two iterators into the Bars|Beats list of the tempo map rather than making a copy; use iterators in the GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@11146 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 457e324c73..0dd5634f95 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1409,21 +1409,16 @@ TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type) } void -TempoMap::map (TempoMap::BBTPointList& points, framepos_t lower, framepos_t upper) +TempoMap::map (TempoMap::BBTPointList::const_iterator& begin, + TempoMap::BBTPointList::const_iterator& end, + framepos_t lower, framepos_t upper) { if (_map.empty() || upper >= _map.back().frame) { recompute_map (false, upper); } - for (BBTPointList::const_iterator i = _map.begin(); i != _map.end(); ++i) { - if ((*i).frame < lower) { - continue; - } - if ((*i).frame >= upper) { - break; - } - points.push_back (*i); - } + begin = lower_bound (_map.begin(), _map.end(), lower); + end = upper_bound (_map.begin(), _map.end(), upper); } const TempoSection& |