@@ -159,10 +159,10 @@ instance_of_cinit;
159
159
* the mutex).
160
160
*/
161
161
162
- static boost ::once_flag debugPrintInitFlag = BOOST_ONCE_INIT ;
162
+ static std ::once_flag debugPrintInitFlag;
163
163
164
164
/* *
165
- * We use boost ::call_once() to make sure mutexDebugLog and
165
+ * We use std ::call_once() to make sure mutexDebugLog and
166
166
* vMsgsBeforeOpenLog are initialized in a thread-safe manner.
167
167
*
168
168
* NOTE: fileout, mutexDebugLog and sometimes vMsgsBeforeOpenLog
@@ -171,7 +171,7 @@ static boost::once_flag debugPrintInitFlag = BOOST_ONCE_INIT;
171
171
* tested, explicit destruction of these objects can be implemented.
172
172
*/
173
173
static FILE* fileout = nullptr ;
174
- static boost ::mutex* mutexDebugLog = nullptr ;
174
+ static std ::mutex* mutexDebugLog = nullptr ;
175
175
static std::list<std::string>* vMsgsBeforeOpenLog;
176
176
177
177
static int FileWriteStr (const std::string &str, FILE *fp)
@@ -182,7 +182,7 @@ static int FileWriteStr(const std::string &str, FILE *fp)
182
182
static void DebugPrintInit ()
183
183
{
184
184
assert (mutexDebugLog == nullptr );
185
- mutexDebugLog = new boost ::mutex ();
185
+ mutexDebugLog = new std ::mutex ();
186
186
vMsgsBeforeOpenLog = new std::list<std::string>;
187
187
}
188
188
@@ -194,8 +194,8 @@ fs::path GetDebugLogPath()
194
194
195
195
bool OpenDebugLog ()
196
196
{
197
- boost ::call_once (&DebugPrintInit, debugPrintInitFlag );
198
- boost::mutex::scoped_lock scoped_lock (*mutexDebugLog);
197
+ std ::call_once (debugPrintInitFlag, &DebugPrintInit );
198
+ std::lock_guard<std::mutex> scoped_lock (*mutexDebugLog);
199
199
200
200
assert (fileout == nullptr );
201
201
assert (vMsgsBeforeOpenLog);
@@ -350,8 +350,8 @@ int LogPrintStr(const std::string &str)
350
350
}
351
351
else if (fPrintToDebugLog )
352
352
{
353
- boost ::call_once (&DebugPrintInit, debugPrintInitFlag );
354
- boost::mutex::scoped_lock scoped_lock (*mutexDebugLog);
353
+ std ::call_once (debugPrintInitFlag, &DebugPrintInit );
354
+ std::lock_guard<std::mutex> scoped_lock (*mutexDebugLog);
355
355
356
356
// buffer if we haven't opened the log yet
357
357
if (fileout == nullptr ) {
0 commit comments