From 3d502403c73ed5b41f4f1d611faf81cf440a4e8d Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 24 Oct 2021 22:00:37 +0200 Subject: [PATCH 1/2] Finalize implementing class and methods --- src/library/library.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/library.cpp b/src/library/library.cpp index 71969cd998a..7fa46f54245 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -262,15 +262,15 @@ TrackCollectionManager* Library::trackCollectionManager() const { } namespace { -class TrackAnalysisSchedulerEnvironmentImpl : public TrackAnalysisSchedulerEnvironment { +class TrackAnalysisSchedulerEnvironmentImpl final : public TrackAnalysisSchedulerEnvironment { public: explicit TrackAnalysisSchedulerEnvironmentImpl(const Library* pLibrary) : m_pLibrary(pLibrary) { DEBUG_ASSERT(m_pLibrary); } - ~TrackAnalysisSchedulerEnvironmentImpl() override = default; + ~TrackAnalysisSchedulerEnvironmentImpl() final = default; - TrackPointer loadTrackById(TrackId trackId) const override { + TrackPointer loadTrackById(TrackId trackId) const final { return m_pLibrary->trackCollectionManager()->getTrackById(trackId); } From f95e049a043df803468027599c980b1c42fedc83 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Sun, 24 Oct 2021 22:13:51 +0200 Subject: [PATCH 2/2] Add TODO for possible replacement of a plain pointer --- src/library/library.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/library/library.cpp b/src/library/library.cpp index 7fa46f54245..101fbb07fdd 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -275,6 +275,7 @@ class TrackAnalysisSchedulerEnvironmentImpl final : public TrackAnalysisSchedule } private: + // TODO: Use std::shared_ptr or std::weak_ptr instead of a plain pointer? const Library* const m_pLibrary; }; } // namespace