From 7dedc13075341e1b862c1074d2b2b33e339bcdcb Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sun, 27 Oct 2019 10:42:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4=D1=83?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/cmlib | 2 +- cmake/etc/uncrustify | 2 +- src/myx/filesystem/paths.cpp | 4 ++-- src/myx/filesystem/whereami.cpp | 8 ++------ src/myx/qt/backports.hpp | 7 ++++++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cmake/cmlib b/cmake/cmlib index 3607309..28e7c7f 160000 --- a/cmake/cmlib +++ b/cmake/cmlib @@ -1 +1 @@ -Subproject commit 36073091bc042af1ef1f7324d26c503bce3ac148 +Subproject commit 28e7c7ffa2602219fc6a90728df703996e0e45de diff --git a/cmake/etc/uncrustify b/cmake/etc/uncrustify index 8b08ebe..0aae214 160000 --- a/cmake/etc/uncrustify +++ b/cmake/etc/uncrustify @@ -1 +1 @@ -Subproject commit 8b08ebee41cab2c632736e5ac137f05acfb64766 +Subproject commit 0aae214a4c5ebff765b8b13ce74afefe53fd0145 diff --git a/src/myx/filesystem/paths.cpp b/src/myx/filesystem/paths.cpp index 6929745..869b1c5 100644 --- a/src/myx/filesystem/paths.cpp +++ b/src/myx/filesystem/paths.cpp @@ -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 ); } diff --git a/src/myx/filesystem/whereami.cpp b/src/myx/filesystem/whereami.cpp index 867bf63..c7d5b08 100644 --- a/src/myx/filesystem/whereami.cpp +++ b/src/myx/filesystem/whereami.cpp @@ -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] == '/' ) { diff --git a/src/myx/qt/backports.hpp b/src/myx/qt/backports.hpp index 1288869..50066f6 100644 --- a/src/myx/qt/backports.hpp +++ b/src/myx/qt/backports.hpp @@ -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;