Правка регистра

This commit is contained in:
Andrei Astafev 2020-04-21 10:59:42 +03:00
parent 95a197a873
commit ab740f7795
6 changed files with 23 additions and 24 deletions

View File

@ -16,7 +16,6 @@ portability-*,
-llvm-header-guard,
-readability-magic-numbers,
-readability-else-after-return,
-readability-identifier-naming,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-performance-no-automatic-move,
@ -90,9 +89,9 @@ CheckOptions:
- key: readability-identifier-naming.ConstexprMethodSuffix
value: ''
- key: readability-identifier-naming.ConstexprVariableCase
value: lower_case
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.ConstexprVariableSuffix
value: ''
- key: readability-identifier-naming.EnumCase
@ -104,7 +103,7 @@ CheckOptions:
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: 'k_'
value: 'k'
- key: readability-identifier-naming.EnumConstantSuffix
value: ''
- key: readability-identifier-naming.FunctionCase
@ -116,7 +115,7 @@ CheckOptions:
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: 'k_'
value: ''
- key: readability-identifier-naming.GlobalConstantSuffix
value: ''
- key: readability-identifier-naming.GlobalConstantPointerCase

View File

@ -13,17 +13,17 @@ namespace base {
template< typename Enum >
struct EnableBitMaskOperators
{
static const bool enable = false;
static const bool k_Enable = false;
};
template< typename Enum >
typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type
typename std::enable_if< EnableBitMaskOperators< Enum >::k_Enable, Enum >::type
operator |( Enum lhs, Enum rhs )
{
using underlying = typename std::underlying_type< Enum >::type;
using Underlying = typename std::underlying_type< Enum >::type;
return( static_cast< Enum >(
static_cast< underlying >( lhs ) |
static_cast< underlying >( rhs )
static_cast< Underlying >( lhs ) |
static_cast< Underlying >( rhs )
) );
}
@ -52,7 +52,7 @@ operator |( Enum lhs, Enum rhs )
template<> \
struct myx::base::EnableBitMaskOperators< x > \
{ \
static const bool enable = true; \
static const bool k_Enable = true; \
};
#endif // ifndef MYX_BASE_ENUM_BITWISE_OPERATIONS_HPP_

View File

@ -10,8 +10,8 @@ namespace math {
bool almost_equal_ulps( const float a, const float b,
const int maxUlpsDiff )
{
float_cmp_t uA( a );
float_cmp_t uB( b );
FloatCmp uA( a );
FloatCmp uB( b );
// Если знаки разные, то числа не равны.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
@ -46,8 +46,8 @@ bool almost_equal_ulps( const float a, const float b,
bool almost_equal_ulps( const double a, const double b,
const int maxUlpsDiff )
{
double_cmp_t uA( a );
double_cmp_t uB( b );
DoubleCmp uA( a );
DoubleCmp uB( b );
// Если знаки разные, то числа не равны.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)

View File

@ -18,8 +18,8 @@ bool almost_equal_ulps_and_abs( const float a, const float b,
return( true );
}
float_cmp_t uA( a );
float_cmp_t uB( b );
FloatCmp uA( a );
FloatCmp uB( b );
// Different signs means they do not match.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
@ -51,8 +51,8 @@ bool almost_equal_ulps_and_abs( const double a, const double b,
return( true );
}
double_cmp_t uA( a );
double_cmp_t uB( b );
DoubleCmp uA( a );
DoubleCmp uB( b );
// Different signs means they do not match.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)

View File

@ -6,7 +6,7 @@
/**
* @brief Объединение для получения знака аргумента типа float.
*/
union float_cmp_t
union FloatCmp
{
int32_t i;
float f;
@ -14,7 +14,7 @@ union float_cmp_t
/**
* @brief Инициализация.
*/
explicit float_cmp_t( float num = 0.0F ) : f( num )
explicit FloatCmp( float num = 0.0F ) : f( num )
{
}
@ -30,7 +30,7 @@ union float_cmp_t
/**
* @brief Объединение для получения знака аргумента типа double.
*/
union double_cmp_t
union DoubleCmp
{
int64_t i;
double d;
@ -38,7 +38,7 @@ union double_cmp_t
/**
* @brief Инициализация.
*/
explicit double_cmp_t( double num = 0.0L ) : d( num )
explicit DoubleCmp( double num = 0.0L ) : d( num )
{
}

View File

@ -9,7 +9,7 @@ namespace myx {
namespace qt {
typedef QList< QTranslator* > QTranslatorsList;
using QTranslatorsList = QList< QTranslator* >;
void append_translators( QTranslatorsList& translators, const QString& appName ); // NOLINT