From be0a68c610ef6c7f10749c29b155ec9a9977cf28 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 2 Jan 2021 15:15:01 -0700 Subject: [PATCH] libtemporal: the TempoMap::_points list serves no purpose, so remove it --- libs/temporal/tempo.cc | 17 ----------------- libs/temporal/temporal/tempo.h | 5 ----- 2 files changed, 22 deletions(-) diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index 184822304c..a64bdd1caa 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -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 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::iterator pi = p.begin(); pi != p.end(); ++pi) { - _points.push_back (**pi); } } diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 258c876fec..b2b96c61be 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -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::_tempo_hook> TempoHookOption; typedef boost::intrusive::member_hook, &MeterPoint::_meter_hook> MeterHookOption; typedef boost::intrusive::member_hook, &MusicTimePoint::_bartime_hook> BarTimeHookOption; - typedef boost::intrusive::member_hook, &Point::_point_hook> PointHookOption; typedef boost::intrusive::list Tempos; typedef boost::intrusive::list Meters; typedef boost::intrusive::list MusicTimes; - typedef boost::intrusive::list 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;