@@ -312,7 +312,7 @@ namespace Catch {
312312 }
313313
314314 // From here, we are touching shared state and need mutex.
315- std::lock_guard<std::mutex> lock ( m_assertionMutex );
315+ Detail::LockGuard lock ( m_assertionMutex );
316316 {
317317 if ( Detail::g_clearMessageScopes ) {
318318 m_messageScopes.clear ();
@@ -334,7 +334,7 @@ namespace Catch {
334334
335335 void RunContext::notifyAssertionStarted ( AssertionInfo const & info ) {
336336 if (m_reportAssertionStarting) {
337- std::lock_guard<std::mutex> lock ( m_assertionMutex );
337+ Detail::LockGuard lock ( m_assertionMutex );
338338 auto _ = scopedDeactivate ( *m_outputRedirect );
339339 m_reporter->assertionStarting ( info );
340340 }
@@ -492,7 +492,7 @@ namespace Catch {
492492 // m_lastResult is updated inside the assertion slow-path, so it needs to be mutexed as well
493493 // TODO: m_lastResult is not updated in the fast path, is there a point in support it at all?
494494 // TODO: also shouldn't it be a thread-local, since assertions are thread-owned until reporter?
495- std::lock_guard<std::mutex> _ ( m_assertionMutex );
495+ Detail::LockGuard _ ( m_assertionMutex );
496496 return &(*m_lastResult);
497497 }
498498
@@ -509,7 +509,7 @@ namespace Catch {
509509 // the fake assertion and stuff.
510510 // TODO: Should we unlock? Trying to let other threads run while fatal error
511511 // is happening is... ill-advised.
512- std::lock_guard<std::mutex> lock ( m_assertionMutex );
512+ Detail::LockGuard lock ( m_assertionMutex );
513513 // TODO: scoped deactivate here? Just give up and do best effort?
514514 // the deactivation can break things further, OTOH so can the
515515 // capture
@@ -530,7 +530,7 @@ namespace Catch {
530530
531531
532532 // TODO: Should we keep granular locks here, or take a single lock at the start?
533- std::lock_guard<std::mutex> lock ( m_assertionMutex );
533+ Detail::LockGuard lock ( m_assertionMutex );
534534 // Best effort cleanup for sections that have not been destructed yet
535535 // Since this is a fatal error, we have not had and won't have the opportunity to destruct them properly
536536 while (!m_activeSections.empty ()) {
0 commit comments