Обновление подмодулей

This commit is contained in:
Andrei Astafev 2020-05-06 17:59:39 +03:00
parent 00be8cd00f
commit 87f4c854d8
11 changed files with 20 additions and 32 deletions

@ -1 +1 @@
Subproject commit 9df188963e5980d305dd50d721978ccdd997a8c3
Subproject commit 23be253a8db87d51c25a67ffc41c452e5b8f58d5

@ -1 +1 @@
Subproject commit 0cd764fc187ab3b66cb31a5549f13b3336858894
Subproject commit 959608f6b5d8c6e4add9f9e7422109bc6b795a5f

@ -1 +1 @@
Subproject commit d0bc6e71e9c613eaaecca62eaf445d647f5216ed
Subproject commit 00bbf686cdb5bd32ba7105bec1234c85aee6f0aa

View File

@ -11,8 +11,8 @@
namespace MF = myx::filesystem;
// Переменные для защиты экземпляра класса MF::PathsMT
std::atomic< MF::PathsMT* > MF::PathsMT::mInstance;
std::mutex MF::PathsMT::mMutex;
std::atomic< MF::PathsMT* > MF::PathsMT::sInstance;
std::mutex MF::PathsMT::sMutex;
int main( int argc, char** argv )

View File

@ -1,17 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ru_RU">
<context>
<name>QObject</name>
<message>
<location filename="../examples/qt/01_translators/translators.cpp" line="16"/>
<source>Yes</source>
<translation>Да</translation>
</message>
<message>
<location filename="../examples/qt/01_translators/translators.cpp" line="18"/>
<source>Cancel</source>
<translation>Отмена</translation>
</message>
</context>
</TS>

View File

@ -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_

View File

@ -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

View File

@ -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$" );

View File

@ -102,8 +102,8 @@ public:
*/
static Paths& instance()
{
static Paths p;
return( p );
static Paths sPaths;
return( sPaths );
}

View File

@ -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

View File

@ -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: