Обновление подмодулей
This commit is contained in:
@ -12,7 +12,7 @@ namespace base {
|
||||
template< typename Enum >
|
||||
struct EnableBitMaskOperators
|
||||
{
|
||||
static const bool k_Enable = false;
|
||||
static const bool kEnable = false;
|
||||
};
|
||||
|
||||
template< typename Enum >
|
||||
@ -47,11 +47,12 @@ operator |( Enum lhs, Enum rhs )
|
||||
* ENABLE_BITMASK_OPERATORS(ns::Permissions)
|
||||
*/
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
#define ENABLE_BITMASK_OPERATORS( x ) \
|
||||
template<> \
|
||||
struct myx::base::EnableBitMaskOperators< x > \
|
||||
{ \
|
||||
static const bool k_Enable = true; \
|
||||
static const bool kEnable = true; \
|
||||
};
|
||||
|
||||
#endif // ifndef MYX_BASE_ENUM_BITWISE_OPERATIONS_HPP_
|
||||
|
@ -12,17 +12,17 @@ namespace base {
|
||||
/**
|
||||
* @brief Константа, представляющая значение, не являющееся числом, для типа float
|
||||
*/
|
||||
constexpr float k_FloatNAN { std::numeric_limits< float >::quiet_NaN() };
|
||||
constexpr float kFloatNAN { std::numeric_limits< float >::quiet_NaN() };
|
||||
|
||||
/**
|
||||
* @brief Константа, представляющая значение, не являющееся числом, для типа double
|
||||
*/
|
||||
constexpr double k_DoubleNAN { std::numeric_limits< double >::quiet_NaN() };
|
||||
constexpr double kDoubleNAN { std::numeric_limits< double >::quiet_NaN() };
|
||||
|
||||
/**
|
||||
* @brief Константа, представляющая значение, не являющееся числом, для типа long double
|
||||
*/
|
||||
constexpr double k_LongDoubleNAN { std::numeric_limits< long double >::quiet_NaN() };
|
||||
constexpr double kLongDoubleNAN { std::numeric_limits< long double >::quiet_NaN() };
|
||||
|
||||
} // namespace base
|
||||
|
||||
|
@ -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