[redcode/crythread-2nd-pass] replaced instances of AZStd::lock_guard<> with AZStd::scoped_lock as per feedback

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-08-12 12:40:03 -07:00
parent 72e99dd52b
commit cc3d2e9969
8 changed files with 23 additions and 23 deletions
+1 -2
View File
@@ -938,10 +938,9 @@ void CCryEditApp::ShowSplashScreen(CCryEditApp* app)
QObject::connect(splashScreen, &QObject::destroyed, splashScreen, [=]
{
g_splashScreenStateLock.lock();
AZStd::scoped_lock lock(g_splashScreenStateLock);
g_pInitializeUIInfo = nullptr;
g_splashScreen = nullptr;
g_splashScreenStateLock.unlock();
});
}
+1 -1
View File
@@ -136,7 +136,7 @@ bool CGameExporter::Export(unsigned int flags, [[maybe_unused]] EEndian eExportE
m_settings.SetHiQuality();
}
AZStd::lock_guard<AZStd::recursive_mutex> autoLock(CGameEngine::GetPakModifyMutex());
AZStd::scoped_lock autoLock(CGameEngine::GetPakModifyMutex());
// Close this pak file.
if (!CloseLevelPack(m_levelPak, true))
+3 -3
View File
@@ -252,7 +252,7 @@ void CEditorImpl::Uninitialize()
void CEditorImpl::UnloadPlugins()
{
AZStd::lock_guard<AZStd::mutex> lock(m_pluginMutex);
AZStd::scoped_lock lock(m_pluginMutex);
// Flush core buses. We're about to unload DLLs and need to ensure we don't have module-owned functions left behind.
AZ::Data::AssetBus::ExecuteQueuedEvents();
@@ -273,7 +273,7 @@ void CEditorImpl::UnloadPlugins()
void CEditorImpl::LoadPlugins()
{
AZStd::lock_guard<AZStd::mutex> lock(m_pluginMutex);
AZStd::scoped_lock lock(m_pluginMutex);
static const QString editor_plugins_folder("EditorPlugins");
@@ -1460,7 +1460,7 @@ void CEditorImpl::UnregisterNotifyListener(IEditorNotifyListener* listener)
ISourceControl* CEditorImpl::GetSourceControl()
{
AZStd::lock_guard<AZStd::mutex> lock(m_pluginMutex);
AZStd::scoped_lock lock(m_pluginMutex);
if (m_pSourceControl)
{
@@ -56,7 +56,7 @@ void CPerforceSourceControl::ShowSettings()
void CPerforceSourceControl::SetSourceControlState(SourceControlState state)
{
AZStd::lock_guard<AZStd::mutex> lock(g_cPerforceValues);
AZStd::scoped_lock lock(g_cPerforceValues);
switch (state)
{