Fix mutex scope and storage duration

This commit is contained in:
Vinnie Falco
2013-07-31 18:41:33 -07:00
parent 5131752402
commit ed82643faf
2 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,11 @@ void FatalError::resetReporter (Reporter& reporter)
FatalError::FatalError (char const* message, char const* fileName, int lineNumber)
{
LockType::ScopedLockType lock (m_mutex);
typedef CriticalSection LockType;
static LockType s_mutex;
LockType::ScopedLockType lock (s_mutex);
String const backtraceString = SystemStats::getStackBacktrace ();

View File

@@ -87,11 +87,7 @@ public:
FatalError (char const* message, char const* fileName, int lineNumber);
private:
typedef CriticalSection LockType;
static Static::Storage <Atomic <Reporter*>, FatalError> s_reporter;
LockType m_mutex;
};
#endif