From 865f694a54a5d96a3a0c2e8211b24d5c3fb361af Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 25 Jul 2018 09:11:44 -0700 Subject: Couple cosmetic improvements --- Graphics/GraphicsEngine/include/DeviceObjectBase.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h index 3d98b426..f9a53979 100644 --- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h +++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h @@ -91,15 +91,14 @@ public: // m_pAllocator->Free(m_pObject) - crash! RefCntAutoPtr pDevice; - return ValidatedCast(this->GetReferenceCounters())-> - ReleaseStrongRef( - [&]() - { - // We must keep the device alive while the object is being destroyed - // Note that internal device objects do not keep strong reference to the device - pDevice = m_spDevice; - } - ); + return TBase::Release( + [&]() + { + // We must keep the device alive while the object is being destroyed + // Note that internal device objects do not keep strong reference to the device + pDevice = m_spDevice; + } + ); } IMPLEMENT_QUERY_INTERFACE_IN_PLACE( IID_DeviceObject, TBase ) -- cgit v1.2.3