Replaced boost::thread with std::thread
This commit is contained in:
@@ -59,8 +59,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
# include <boost/thread/thread.hpp>
|
||||
# include <boost/thread/mutex.hpp>
|
||||
# include <thread>
|
||||
# include <mutex>
|
||||
#endif
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
using namespace Assimp;
|
||||
@@ -103,7 +103,7 @@ namespace Assimp
|
||||
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
/** Global mutex to manage the access to the log-stream map */
|
||||
static boost::mutex gLogStreamMutex;
|
||||
static std::mutex gLogStreamMutex;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
~LogToCallbackRedirector() {
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
boost::mutex::scoped_lock lock(gLogStreamMutex);
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
// (HACK) Check whether the 'stream.user' pointer points to a
|
||||
// custom LogStream allocated by #aiGetPredefinedLogStream.
|
||||
@@ -321,8 +321,8 @@ ASSIMP_API const aiScene* aiApplyPostProcessing(const aiScene* pScene,
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API const aiScene *aiApplyCustomizedPostProcessing( const aiScene *scene,
|
||||
BaseProcess* process,
|
||||
ASSIMP_API const aiScene *aiApplyCustomizedPostProcessing( const aiScene *scene,
|
||||
BaseProcess* process,
|
||||
bool requestValidation ) {
|
||||
const aiScene* sc( NULL );
|
||||
|
||||
@@ -343,7 +343,7 @@ ASSIMP_API const aiScene *aiApplyCustomizedPostProcessing( const aiScene *scene,
|
||||
}
|
||||
|
||||
ASSIMP_END_EXCEPTION_REGION( const aiScene* );
|
||||
|
||||
|
||||
return sc;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ ASSIMP_API void aiAttachLogStream( const aiLogStream* stream )
|
||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
boost::mutex::scoped_lock lock(gLogStreamMutex);
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
|
||||
LogStream* lg = new LogToCallbackRedirector(*stream);
|
||||
@@ -402,7 +402,7 @@ ASSIMP_API aiReturn aiDetachLogStream( const aiLogStream* stream)
|
||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
boost::mutex::scoped_lock lock(gLogStreamMutex);
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
// find the log-stream associated with this data
|
||||
LogStreamMap::iterator it = gActiveLogStreams.find( *stream);
|
||||
@@ -427,7 +427,7 @@ ASSIMP_API void aiDetachAllLogStreams(void)
|
||||
{
|
||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
boost::mutex::scoped_lock lock(gLogStreamMutex);
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
Logger *logger( DefaultLogger::get() );
|
||||
if ( NULL == logger ) {
|
||||
@@ -440,7 +440,7 @@ ASSIMP_API void aiDetachAllLogStreams(void)
|
||||
}
|
||||
gActiveLogStreams.clear();
|
||||
DefaultLogger::kill();
|
||||
|
||||
|
||||
ASSIMP_END_EXCEPTION_REGION(void);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user