From 13440e98e8cd926620d9913aa72780ceaca4f668 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 30 Oct 2019 10:46:28 -0700 Subject: Some code refactoring --- Graphics/GraphicsEngine/include/DeviceContextBase.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h index 7c67dd16..5ed6dc56 100644 --- a/Graphics/GraphicsEngine/include/DeviceContextBase.h +++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h @@ -68,6 +68,7 @@ class DeviceContextBase : public ObjectBase { public: using TObjectBase = ObjectBase; + using DeviceImplType = typename ImplementationTraits::DeviceType; using BufferImplType = typename ImplementationTraits::BufferType; using TextureImplType = typename ImplementationTraits::TextureType; using PipelineStateImplType = typename ImplementationTraits::PipelineStateType; @@ -76,10 +77,10 @@ public: /// \param pRefCounters - reference counters object that controls the lifetime of this device context. /// \param pRenderDevice - render device. /// \param bIsDeferred - flag indicating if this instance is a deferred context - DeviceContextBase(IReferenceCounters* pRefCounters, IRenderDevice* pRenderDevice, bool bIsDeferred) : - TObjectBase(pRefCounters), - m_pDevice(pRenderDevice), - m_bIsDeferred(bIsDeferred) + DeviceContextBase(IReferenceCounters* pRefCounters, DeviceImplType* pRenderDevice, bool bIsDeferred) : + TObjectBase {pRefCounters }, + m_pDevice {pRenderDevice}, + m_bIsDeferred{bIsDeferred } { } @@ -221,7 +222,7 @@ protected: #endif /// Strong reference to the device. - RefCntAutoPtr m_pDevice; + RefCntAutoPtr m_pDevice; /// Strong reference to the swap chain. Swap chain holds /// weak reference to the immediate context. -- cgit v1.2.3