Merge branch 'master' of gitlab.2:f1x1t/myxlib

This commit is contained in:
2019-11-24 16:30:41 +03:00
15 changed files with 43 additions and 30 deletions

View File

@ -17,7 +17,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources})
add_clang_analyze_check(${current_target} ${current_target_sources})
add_clazy_check(${current_target} ${current_target_sources})
add_pvs_check(${current_target})
add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers})
# Форматирование исходников
add_format_sources(${current_target} ${current_target_sources} ${current_target_headers})
target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})

View File

@ -22,7 +22,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources})
add_clang_analyze_check(${current_target} ${current_target_sources})
add_clazy_check(${current_target} ${current_target_sources})
add_pvs_check(${current_target})
add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers})
# Форматирование исходников
add_format_sources(${current_target} ${current_target_sources} ${current_target_headers})
target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS})

View File

@ -211,9 +211,9 @@ bool Paths::makeDefaultDirectories()
{
bool status = true;
if ( !m_dataDirectory.mkpath( m_dataDirectory.absolutePath() ) ) { status = false; }
if ( !m_dataDirectory.mkpath( m_dataDirectory.absolutePath() ) ) { status = false; }
if ( !m_configDirectory.mkpath( m_configDirectory.absolutePath() ) ) { status = false; }
if ( !m_cacheDirectory.mkpath( m_cacheDirectory.absolutePath() ) ) { status = false; }
if ( !m_cacheDirectory.mkpath( m_cacheDirectory.absolutePath() ) ) { status = false; }
return( status );
}

View File

@ -68,9 +68,7 @@ int getExecutablePath( char* out, int capacity, int* dirname_length )
if ( dirname_length )
{
int i;
for ( i = length - 1; i >= 0; --i )
for ( int i = length - 1; i >= 0; --i )
{
if ( out[i] == '/' )
{
@ -156,9 +154,7 @@ int getModulePath( char* out, int capacity, int* dirname_length )
if ( dirname_length )
{
int i;
for ( i = length - 1; i >= 0; --i )
for ( int i = length - 1; i >= 0; --i )
{
if ( out[i] == '/' )
{

View File

@ -20,7 +20,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources})
add_clang_analyze_check(${current_target} ${current_target_sources})
add_clazy_check(${current_target} ${current_target_sources})
add_pvs_check(${current_target})
add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers})
# Форматирование исходников
add_format_sources(${current_target} ${current_target_sources} ${current_target_headers})
target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS})

View File

@ -16,7 +16,9 @@ add_clang_tidy_check(${current_target} ${current_target_sources})
add_clang_analyze_check(${current_target} ${current_target_sources})
add_clazy_check(${current_target} ${current_target_sources})
add_pvs_check(${current_target})
add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers})
# Форматирование исходников
add_format_sources(${current_target} ${current_target_sources} ${current_target_headers})
target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
target_include_directories(${current_target} SYSTEM PUBLIC ${FMT_INCLUDE_DIRS})

View File

@ -19,7 +19,12 @@ struct QOverload
// this adds const to non-const objects (like std::as_const)
template < typename T >
Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept { return( t ); }
Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept
{
return( t );
}
// prevent rvalue arguments:
template < typename T >
void qAsConst( const T&& ) = delete;