13
0

move tempo map memento binder into .cc and actuall implement the RCU version

This commit is contained in:
Paul Davis 2020-11-27 16:24:44 -07:00
parent 90553b315f
commit 44ff395ec8
2 changed files with 12 additions and 1 deletions

View File

@ -2864,3 +2864,14 @@ TempoMap::twist_tempi (TempoSection* ts, const Tempo& bpm, const framepos_t fram
}
#endif
void
TempoMap::MementoBinder::set_state (XMLNode const & node, int version) const
{
TempoMap::SharedPtr map (write_copy());
map->set_state (node, version);
update (map);
fetch ();
}

View File

@ -771,7 +771,7 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible
class MementoBinder : public MementoCommandBinder<TempoMap> {
public:
MementoBinder () {}
void set_state (XMLNode const & node, int version) const { TempoMap::use()->set_state (node, version); }
void set_state (XMLNode const & node, int version) const;
XMLNode& get_state () const { return TempoMap::use()->get_state(); }
std::string type_name() const { return X_("Temporal::TempoMap"); }
void add_state (XMLNode*) {}