Обновление подмодулей
This commit is contained in:
@@ -21,7 +21,7 @@ namespace filesystem {
|
||||
|
||||
MYXLIB_INLINE Paths::Paths() = default;
|
||||
|
||||
MYXLIB_INLINE Paths::HierarchyType Paths::getHierarchyType()
|
||||
MYXLIB_INLINE Paths::HierarchyType Paths::getHierarchyType() // V2008
|
||||
{
|
||||
QRegExp binUnityRegexp( "/s*bin/unity$" );
|
||||
QRegExp binRegexp( "/s*bin$" );
|
||||
|
@@ -102,8 +102,8 @@ public:
|
||||
*/
|
||||
static Paths& instance()
|
||||
{
|
||||
static Paths p;
|
||||
return( p );
|
||||
static Paths sPaths;
|
||||
return( sPaths );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -23,15 +23,15 @@ MYXLIB_INLINE PathsMT::PathsMT() = default;
|
||||
|
||||
MYXLIB_INLINE PathsMT& PathsMT::instance()
|
||||
{
|
||||
volatile PathsMT* localInstance = mInstance.load( std::memory_order_acquire );
|
||||
volatile PathsMT* localInstance = sInstance.load( std::memory_order_acquire );
|
||||
if ( localInstance == nullptr )
|
||||
{
|
||||
std::lock_guard< std::mutex > myLock( mMutex );
|
||||
localInstance = mInstance.load( std::memory_order_relaxed );
|
||||
std::lock_guard< std::mutex > myLock( sMutex );
|
||||
localInstance = sInstance.load( std::memory_order_relaxed );
|
||||
if ( localInstance == nullptr ) // -V1036
|
||||
{
|
||||
localInstance = new PathsMT();
|
||||
mInstance.store( const_cast< PathsMT* >( localInstance ), std::memory_order_release ); // NOLINT
|
||||
sInstance.store( const_cast< PathsMT* >( localInstance ), std::memory_order_release ); // NOLINT
|
||||
}
|
||||
}
|
||||
return( const_cast< PathsMT& >( *localInstance ) ); // NOLINT
|
||||
|
@@ -31,8 +31,8 @@ class PathsMT : public Paths
|
||||
PathsMT();
|
||||
~PathsMT() = default;
|
||||
|
||||
static std::atomic< PathsMT* > mInstance;
|
||||
static std::mutex mMutex;
|
||||
static std::atomic< PathsMT* > sInstance;
|
||||
static std::mutex sMutex;
|
||||
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user