13
0

libtemporal: the TempoMap::_points list serves no purpose, so remove it

This commit is contained in:
Paul Davis 2021-01-02 15:15:01 -07:00
parent 261c46e0f7
commit be0a68c610
2 changed files with 0 additions and 22 deletions

View File

@ -620,10 +620,6 @@ TempoMap::TempoMap (Tempo const & initial_tempo, Meter const & initial_meter)
_tempos.push_back (*tp);
_meters.push_back (*mp);
_bartimes.push_back (*mtp);
_points.push_back (*tp);
_points.push_back (*mp);
_points.push_back (*mtp);
}
TempoMap::~TempoMap()
@ -651,32 +647,19 @@ TempoMap::operator= (TempoMap const & other)
void
TempoMap::copy_points (TempoMap const & other)
{
std::vector<Point*> p;
p.reserve (other._meters.size() + other._tempos.size() + other._bartimes.size());
for (Meters::const_iterator m = other._meters.begin(); m != other._meters.end(); ++m) {
MeterPoint* mp = new MeterPoint (*m);
_meters.push_back (*mp);
p.push_back (mp);
}
for (Tempos::const_iterator t = other._tempos.begin(); t != other._tempos.end(); ++t) {
TempoPoint* tp = new TempoPoint (*t);
_tempos.push_back (*tp);
p.push_back (tp);
}
for (MusicTimes::const_iterator mt = other._bartimes.begin(); mt != other._bartimes.end(); ++mt) {
MusicTimePoint* mtp = new MusicTimePoint (*mt);
_bartimes.push_back (*mtp);
p.push_back (mtp);
}
sort (p.begin(), p.end(), Point::ptr_sclock_comparator());
for (std::vector<Point*>::iterator pi = p.begin(); pi != p.end(); ++pi) {
_points.push_back (**pi);
}
}

View File

@ -119,8 +119,6 @@ class LIBTEMPORAL_API Point {
TempoMap const & map() const { return *_map; }
boost::intrusive::list_member_hook<> _point_hook;
protected:
superclock_t _sclock;
Beats _quarters;
@ -801,12 +799,10 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible
typedef boost::intrusive::member_hook<TempoPoint,boost::intrusive::list_member_hook<>, &TempoPoint::_tempo_hook> TempoHookOption;
typedef boost::intrusive::member_hook<MeterPoint,boost::intrusive::list_member_hook<>, &MeterPoint::_meter_hook> MeterHookOption;
typedef boost::intrusive::member_hook<MusicTimePoint,boost::intrusive::list_member_hook<>, &MusicTimePoint::_bartime_hook> BarTimeHookOption;
typedef boost::intrusive::member_hook<Point,boost::intrusive::list_member_hook<>, &Point::_point_hook> PointHookOption;
typedef boost::intrusive::list<TempoPoint,TempoHookOption> Tempos;
typedef boost::intrusive::list<MeterPoint,MeterHookOption> Meters;
typedef boost::intrusive::list<MusicTimePoint,BarTimeHookOption> MusicTimes;
typedef boost::intrusive::list<Point,PointHookOption> Points;
Beats quarters_at_sample (samplepos_t sc) const { return quarters_at_superclock (samples_to_superclock (sc, TEMPORAL_SAMPLE_RATE)); }
Beats quarters_at_superclock (superclock_t sc) const;
@ -815,7 +811,6 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible
Tempos _tempos;
Meters _meters;
MusicTimes _bartimes;
Points _points;
TimeDomain _time_domain;