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/GraphicsTools/include/ScreenCapture.h | 2 +- Graphics/GraphicsTools/src/ScreenCapture.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Graphics/GraphicsTools') diff --git a/Graphics/GraphicsTools/include/ScreenCapture.h b/Graphics/GraphicsTools/include/ScreenCapture.h index f56d6f9c..d4f8533f 100644 --- a/Graphics/GraphicsTools/include/ScreenCapture.h +++ b/Graphics/GraphicsTools/include/ScreenCapture.h @@ -58,7 +58,7 @@ public: size_t GetNumPendingCaptures() { - std::lock_guard Lock(m_PendingTexturesMtx); + std::lock_guard Lock{m_PendingTexturesMtx}; return m_PendingTextures.size(); } diff --git a/Graphics/GraphicsTools/src/ScreenCapture.cpp b/Graphics/GraphicsTools/src/ScreenCapture.cpp index 5f770301..20b8fd6a 100644 --- a/Graphics/GraphicsTools/src/ScreenCapture.cpp +++ b/Graphics/GraphicsTools/src/ScreenCapture.cpp @@ -44,7 +44,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui RefCntAutoPtr pStagingTexture; { - std::lock_guard Lock(m_AvailableTexturesMtx); + std::lock_guard Lock{m_AvailableTexturesMtx}; while (!m_AvailableTextures.empty() && !pStagingTexture) { pStagingTexture = std::move(m_AvailableTextures.back()); @@ -77,7 +77,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui pContext->SignalFence(m_pFence, m_CurrentFenceValue); { - std::lock_guard Lock(m_PendingTexturesMtx); + std::lock_guard Lock{m_PendingTexturesMtx}; m_PendingTextures.emplace_back(std::move(pStagingTexture), FrameId, m_CurrentFenceValue); } @@ -88,7 +88,7 @@ void ScreenCapture::Capture(ISwapChain* pSwapChain, IDeviceContext* pContext, Ui ScreenCapture::CaptureInfo ScreenCapture::GetCapture() { CaptureInfo Capture; - std::lock_guard Lock(m_PendingTexturesMtx); + std::lock_guard Lock{m_PendingTexturesMtx}; if (!m_PendingTextures.empty()) { auto& OldestCapture = m_PendingTextures.front(); @@ -105,7 +105,7 @@ ScreenCapture::CaptureInfo ScreenCapture::GetCapture() void ScreenCapture::RecycleStagingTexture(RefCntAutoPtr&& pTexture) { - std::lock_guard Lock(m_AvailableTexturesMtx); + std::lock_guard Lock{m_AvailableTexturesMtx}; m_AvailableTextures.emplace_back(std::move(pTexture)); } -- cgit v1.2.3