diff options
Diffstat (limited to 'src/profiling/RegisterBackendCounters.hpp')
-rw-r--r-- | src/profiling/RegisterBackendCounters.hpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/profiling/RegisterBackendCounters.hpp b/src/profiling/RegisterBackendCounters.hpp index 8f1fa049b6..f81f487472 100644 --- a/src/profiling/RegisterBackendCounters.hpp +++ b/src/profiling/RegisterBackendCounters.hpp @@ -20,10 +20,12 @@ class RegisterBackendCounters : public IRegisterBackendCounters { public: - RegisterBackendCounters(uint16_t currentMaxGlobalCounterID, const BackendId& backendId) - : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID), - m_CounterDirectory(ProfilingService::Instance().GetCounterRegistry()), - m_BackendId(backendId) {} + RegisterBackendCounters( + uint16_t currentMaxGlobalCounterID, const BackendId& backendId, ProfilingService& profilingService) + : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID), + m_BackendId(backendId), + m_ProfilingService(profilingService), + m_CounterDirectory(m_ProfilingService.GetCounterRegistry()) {} ~RegisterBackendCounters() = default; @@ -51,8 +53,9 @@ public: private: uint16_t m_CurrentMaxGlobalCounterID; - ICounterRegistry& m_CounterDirectory; const BackendId& m_BackendId; + ProfilingService& m_ProfilingService; + ICounterRegistry& m_CounterDirectory; }; } // namespace profiling |