Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackAnalysisSchedulerEnvironmentImpl: Finalize implementing class and methods #4481

Merged
merged 2 commits into from
Oct 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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