From f17a516cef87080f8fe960ea2376ff3a94bd6f71 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 10 Apr 2023 09:14:19 -0600 Subject: [PATCH] temporal: fix comment explaining when/how TempoMap::set() can be used --- libs/temporal/temporal/tempo.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 8e8fd61a36..39c1c72b7e 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -705,7 +705,12 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible */ LIBTEMPORAL_API static SharedPtr read() { return _map_mgr.reader(); } - LIBTEMPORAL_API static void set (SharedPtr new_map) { _tempo_map_p = new_map; /* new_map must have been fetched with read() */ } + + /* Because WritableSharedPtr can be implicitly cast to SharedPtr, this + * can be used on either a write_copy()'ed map, or one obtained via the + * RCU reader() method. + */ + LIBTEMPORAL_API static void set (SharedPtr new_map) { _tempo_map_p = new_map; } /* API for typical tempo map changes */