Правки анализаторов

This commit is contained in:
Andrei Astafev 2020-04-04 09:31:38 +03:00
parent e09a7f4e3e
commit 6e43742b2c
8 changed files with 32 additions and 30 deletions

View File

@ -1,20 +1,22 @@
---
Checks: '-*,
bugprone-*,
clang-analyzer-*,
cppcoreguidelines-*,
google-*,
clang-analyzer-*,
llvm-*,
misc-*,
modernize-*,
readability-*,
performance-*,
portability-*,
readability-identifier-naming,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-readability-magic-numbers,
-readability-else-after-return,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-performance-no-automatic-move,
'
@ -32,9 +34,9 @@ CheckOptions:
- key: readability-identifier-naming.ClassSuffix
value: ''
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
value: CamelCase
- key: readability-identifier-naming.ClassConstantPrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.ClassConstantSuffix
value: ''
- key: readability-identifier-naming.ClassMemberCase
@ -50,9 +52,9 @@ CheckOptions:
- key: readability-identifier-naming.ClassMethodSuffix
value: ''
- key: readability-identifier-naming.ConstantCase
value: UPPER_CASE
value: CamelCase
- key: readability-identifier-naming.ConstantPrefix
value: PRE
value: 'k_'
- key: readability-identifier-naming.ConstantSuffix
value: POST
- key: readability-identifier-naming.ConstantMemberCase
@ -98,9 +100,9 @@ CheckOptions:
- key: readability-identifier-naming.EnumSuffix
value: ''
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.EnumConstantSuffix
value: ''
- key: readability-identifier-naming.FunctionCase
@ -110,9 +112,9 @@ CheckOptions:
- key: readability-identifier-naming.FunctionSuffix
value: ''
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.GlobalConstantSuffix
value: ''
- key: readability-identifier-naming.GlobalConstantPointerCase
@ -148,7 +150,7 @@ CheckOptions:
- key: readability-identifier-naming.LocalConstantCase
value: camelBack
- key: readability-identifier-naming.LocalConstantPrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.LocalConstantSuffix
value: ''
- key: readability-identifier-naming.LocalConstantPointerCase
@ -244,7 +246,7 @@ CheckOptions:
- key: readability-identifier-naming.StaticConstantCase
value: camelBack
- key: readability-identifier-naming.StaticConstantPrefix
value: ''
value: 'k_'
- key: readability-identifier-naming.StaticConstantSuffix
value: ''
- key: readability-identifier-naming.StaticVariableCase

View File

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

View File

@ -2,8 +2,9 @@
#include <myx/filesystem/current_executable.hpp>
#include <paths.h>
#include <QString>
#include <QCoreApplication>
#include <QString>
namespace myx {

View File

@ -3,17 +3,15 @@
#include <myx/filesystem/paths.hpp>
#include <paths.h>
#include <QString>
#include <QCoreApplication>
#include <QString>
namespace myx {
namespace filesystem {
Paths::Paths()
{
}
Paths::Paths() = default;
Paths::HierarchyType Paths::getHierarchyType()
{

View File

@ -83,8 +83,8 @@ class Paths
HierarchyType getHierarchyType();
static std::atomic< Paths* > m_instance;
static std::mutex m_mutex;
static std::atomic< Paths* > mInstance;
static std::mutex mMutex;
public:
/**
@ -93,15 +93,15 @@ public:
*/
static Paths* getInstance()
{
Paths* localInstance = m_instance.load( std::memory_order_acquire );
Paths* localInstance = mInstance.load( std::memory_order_acquire );
if ( !localInstance )
{
std::lock_guard< std::mutex > myLock( m_mutex );
localInstance = m_instance.load( std::memory_order_relaxed );
std::lock_guard< std::mutex > myLock( mMutex );
localInstance = mInstance.load( std::memory_order_relaxed );
if ( !localInstance )
{
localInstance = new Paths();
m_instance.store( localInstance, std::memory_order_release );
mInstance.store( localInstance, std::memory_order_release );
}
}
return( localInstance );

View File

@ -1,5 +1,5 @@
#include <myx/math/float_cmp_types.hpp>
#include <myx/math/almost_equal_ulps.hpp>
#include <myx/math/float_cmp_types.hpp>
#include <cmath>

View File

@ -1,5 +1,5 @@
#include <myx/math/float_cmp_types.hpp>
#include <myx/math/almost_equal_ulps_and_abs.hpp>
#include <myx/math/float_cmp_types.hpp>
#include <cmath>

View File

@ -1,9 +1,10 @@
#include <myx/base/config.hpp>
#include "translators.hpp"
#include <myx/base/config.hpp>
#include <QCoreApplication>
#include <QLocale>
#include <QLibraryInfo>
#include <QLocale>
namespace myx {