Skip to content

Commit

Permalink
Merge pull request #4481 from uklotzde/trackanalysisscheduler
Browse files Browse the repository at this point in the history
TrackAnalysisSchedulerEnvironmentImpl: Finalize implementing class and methods
  • Loading branch information
Swiftb0y authored Oct 25, 2021
2 parents c99b8ba + f95e049 commit 925c68c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/library/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,20 @@ 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);
}

private:
// TODO: Use std::shared_ptr or std::weak_ptr instead of a plain pointer?
const Library* const m_pLibrary;
};
} // namespace
Expand Down

0 comments on commit 925c68c

Please sign in to comment.