summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/tempo.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-18 21:31:34 +0100
committerRobin Gareus <robin@gareus.org>2017-03-18 21:33:40 +0100
commita9ca7f649a1ff84409ef7e86166b1161e8848efb (patch)
tree9daa2f167b14c9ca69e14605392b163502df1ed2 /libs/ardour/ardour/tempo.h
parent448bc635e528f068d88a34de03622fba0e3ea180 (diff)
Resolve copy-c'tor and assignment issue with TempoMap
There are various issues with copy-construction: no readlock is taken, Tempo/Metric Sections were static-cast to non-const pointers and passed as references... This remove the [now] unused copy-c'tor, and fixes various const issues.
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r--libs/ardour/ardour/tempo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index dcf68d7f16..0da03925c0 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -323,7 +323,6 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
{
public:
TempoMap (framecnt_t frame_rate);
- TempoMap (TempoMap const &);
~TempoMap();
TempoMap& operator= (TempoMap const &);
@@ -519,6 +518,8 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
void fix_legacy_end_session();
private:
+ /* prevent copy construction */
+ TempoMap (TempoMap const&);
TempoSection* previous_tempo_section_locked (const Metrics& metrics, TempoSection*) const;
TempoSection* next_tempo_section_locked (const Metrics& metrics, TempoSection*) const;
@@ -604,8 +605,8 @@ private:
bool remove_tempo_locked (const TempoSection&);
bool remove_meter_locked (const MeterSection&);
- TempoSection* copy_metrics_and_point (const Metrics& metrics, Metrics& copy, TempoSection* section);
- MeterSection* copy_metrics_and_point (const Metrics& metrics, Metrics& copy, MeterSection* section);
+ TempoSection* copy_metrics_and_point (const Metrics& metrics, Metrics& copy, TempoSection* section) const;
+ MeterSection* copy_metrics_and_point (const Metrics& metrics, Metrics& copy, MeterSection* section) const;
};
}; /* namespace ARDOUR */