From e0c9e2f551b47d49caea79629aeea10be96b0e8b Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 15 May 2020 20:14:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/filesystem/01_minimal/minimal.cpp | 2 +- src/myx/base/endian_types.hpp | 9 +++++---- src/myx/base/span.hpp | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/filesystem/01_minimal/minimal.cpp b/examples/filesystem/01_minimal/minimal.cpp index 711ba72..a1e16f8 100644 --- a/examples/filesystem/01_minimal/minimal.cpp +++ b/examples/filesystem/01_minimal/minimal.cpp @@ -48,4 +48,4 @@ int main( int argc, char** argv ) qDebug() << "userLogDirectory : " << paths.userLogDirectory(); return( 0 ); -} +} // main diff --git a/src/myx/base/endian_types.hpp b/src/myx/base/endian_types.hpp index 9573522..bc61749 100644 --- a/src/myx/base/endian_types.hpp +++ b/src/myx/base/endian_types.hpp @@ -3,7 +3,7 @@ #pragma once -#include "span.hpp" +#include #include #include @@ -62,6 +62,7 @@ public: // 1. Set an OE from a PE // 2. Get a PE from an OE // Storage in + // NOLINTNEXTLINE LittleEndianType( const T& b ) : m_data( transform( b ) ) {} @@ -96,12 +97,11 @@ public: friend std::istream& operator >>( std::istream& in, LittleEndianType& b ) { T val; in >> val; b = val; return( in ); } std::string toStdString() { return( std::to_string( transform( m_data ) ) ); } #ifdef QT_CORE_LIB - friend QDebug& operator <<( QDebug& out, const LittleEndianType b ) { out << T( b ); return( out ); } + friend QDebug& operator <<( QDebug& out, const LittleEndianType< T > b ) { out << T( b ); return( out ); } QString toQString() { return( QString::number( transform( m_data ) ) ); } #endif }; // class LittleEndianType - template< typename T > class BigEndianType : public EndianTypesBase< T > { @@ -123,6 +123,7 @@ public: // 1. Set an OE from a PE // 2. Get a PE from an OE // Storage in + // NOLINTNEXTLINE BigEndianType( const T& b ) : m_data( transform( b ) ) {} @@ -157,7 +158,7 @@ public: friend std::istream& operator >>( std::istream& in, BigEndianType& b ) { T val; in >> val; b = val; return( in ); } std::string toStdString() { return( std::to_string( transform( m_data ) ) ); } #ifdef QT_CORE_LIB - friend QDebug& operator <<( QDebug& out, const BigEndianType b ) { out << T( b ); return( out ); } + friend QDebug& operator <<( QDebug& out, const BigEndianType< T > b ) { out << T( b ); return( out ); } QString toQString() { return( QString::number( transform( m_data ) ) ); } #endif }; // class BigEndianType diff --git a/src/myx/base/span.hpp b/src/myx/base/span.hpp index 5b32926..7533e52 100644 --- a/src/myx/base/span.hpp +++ b/src/myx/base/span.hpp @@ -19,11 +19,11 @@ namespace myx { namespace base { -template< typename ... Ts > struct make_void { typedef void type;}; -template< typename ... Ts > using void_t = typename make_void< Ts... >::type; +template< typename ... Ts > struct make_void { typedef void type;}; // NOLINT +template< typename ... Ts > using void_t = typename make_void< Ts... >::type; // NOLINT template< class T, class E, class = void > -struct is_contiguous_container : std::false_type {}; +struct is_contiguous_container : std::false_type {}; // NOLINT template< class T, class E > struct is_contiguous_container< T, E, void_t< @@ -52,7 +52,7 @@ struct is_contiguous_container< T, E, void_t< @tparam T The type pointed to by span iterators */ template< class T > -class span +class span // NOLINT { T* m_data = nullptr; std::size_t m_size = 0;