From b1271a491e708525a0fabdae4c1065b3f9eba53d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 4 Aug 2020 12:37:29 -0600 Subject: [PATCH] Temporal: add TempoMap::use() which returns the per-thread ptr-to-tempo-map without updating the pointer --- libs/temporal/temporal/tempo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 47cc6b8548..cccc8ce5c0 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -612,7 +612,8 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible static SerializedRCUManager _map_mgr; public: static void update_thread_tempo_map() { SharedPtr p = _map_mgr.reader(); _tempo_map_p.set (&p); } - static SharedPtr fetch() { update_thread_tempo_map(); SharedPtr p = *_tempo_map_p.get(); return p; } + static SharedPtr use() { return *_tempo_map_p.get(); } + static SharedPtr fetch() { update_thread_tempo_map(); return use(); } /* and now on with the rest of the show ... */