From 20fbea68913e09adad6bb0a4357e995ceb782871 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 7 Oct 2019 20:53:26 -0700 Subject: More cosmetic code changes --- Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h | 10 +++++----- .../include/RenderDeviceNextGenBase.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h index 3790c53c..7e8c8849 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h +++ b/Graphics/GraphicsEngineNextGenBase/include/DynamicHeap.h @@ -63,13 +63,13 @@ public: void DiscardMasterBlocks(std::vector& /*Blocks*/, Uint64 FenceValue) { - std::lock_guard Lock(m_RingBufferMtx); + std::lock_guard Lock{m_RingBufferMtx}; m_RingBuffer.FinishCurrentFrame(FenceValue); } void ReleaseStaleBlocks(Uint64 LastCompletedFenceValue) { - std::lock_guard Lock(m_RingBufferMtx); + std::lock_guard Lock{m_RingBufferMtx}; m_RingBuffer.ReleaseCompletedFrames(LastCompletedFenceValue); } @@ -79,7 +79,7 @@ public: protected: MasterBlock AllocateMasterBlock(OffsetType SizeInBytes, OffsetType Alignment) { - std::lock_guard Lock(m_RingBufferMtx); + std::lock_guard Lock{m_RingBufferMtx}; return m_RingBuffer.Allocate(SizeInBytes, Alignment); } @@ -144,7 +144,7 @@ public: { if (Mgr != nullptr) { - std::lock_guard Lock(Mgr->m_AllocationsMgrMtx); + std::lock_guard Lock{Mgr->m_AllocationsMgrMtx}; #ifdef DEVELOPMENT --Mgr->m_MasterBlockCounter; #endif @@ -169,7 +169,7 @@ public: protected: MasterBlock AllocateMasterBlock(OffsetType SizeInBytes, OffsetType Alignment) { - std::lock_guard Lock(m_AllocationsMgrMtx); + std::lock_guard Lock{m_AllocationsMgrMtx}; auto NewBlock = m_AllocationsMgr.Allocate(SizeInBytes, Alignment); #ifdef DEVELOPMENT if (NewBlock.IsValid()) diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index bac01188..135dd941 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -153,7 +153,7 @@ public: Uint64 CmdBufferNumber = 0; Uint64 FenceValue = 0; { - std::lock_guard Lock(Queue.Mtx); + std::lock_guard Lock{Queue.Mtx}; if (ReleaseResources) { @@ -193,7 +193,7 @@ public: auto& Queue = m_CommandQueues[QueueIndex]; { - std::lock_guard Lock(Queue.Mtx); + std::lock_guard Lock{Queue.Mtx}; // Increment command buffer number before submitting the cmd buffer. // This will make sure that any resource released while this function @@ -256,7 +256,7 @@ public: { VERIFY_EXPR(QueueIndex < m_CmdQueueCount); auto& Queue = m_CommandQueues[QueueIndex]; - std::lock_guard Lock(Queue.Mtx); + std::lock_guard Lock{Queue.Mtx}; Action(Queue.CmdQueue); } -- cgit v1.2.3