From f2cec0f775ae726d5dc4b6aed4aefd7ea4d16ed5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:00:44 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- include/openPMD/DatatypeHelpers.hpp | 18 ++++++++++-------- include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp | 18 ++++++++++-------- include/openPMD/Series.hpp | 6 +++--- include/openPMD/backend/Container.hpp | 4 ++-- src/IO/ADIOS/ADIOS2Auxiliary.cpp | 7 +++---- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/include/openPMD/DatatypeHelpers.hpp b/include/openPMD/DatatypeHelpers.hpp index f3f5754200..b0c354283f 100644 --- a/include/openPMD/DatatypeHelpers.hpp +++ b/include/openPMD/DatatypeHelpers.hpp @@ -119,11 +119,12 @@ namespace detail * arguments and with the template parameter specified by dt. */ template< typename Action, typename... Args > -auto switchType( Datatype dt, Args &&... args ) -> decltype( - Action::template call< char >( std::forward< Args >( args )... ) ) +auto switchType( Datatype dt, Args &&... args ) + -> decltype( Action::template call< char >( + std::forward< Args >( args )... ) ) { - using ReturnType = decltype( - Action::template call< char >( std::forward< Args >( args )... ) ); + using ReturnType = decltype( Action::template call< char >( + std::forward< Args >( args )... ) ); switch( dt ) { case Datatype::CHAR: @@ -258,11 +259,12 @@ auto switchType( Datatype dt, Args &&... args ) -> decltype( * arguments and with the template parameter specified by dt. */ template< typename Action, typename... Args > -auto switchNonVectorType( Datatype dt, Args &&... args ) -> decltype( - Action::template call< char >( std::forward< Args >( args )... ) ) +auto switchNonVectorType( Datatype dt, Args &&... args ) + -> decltype( Action::template call< char >( + std::forward< Args >( args )... ) ) { - using ReturnType = decltype( - Action::template call< char >( std::forward< Args >( args )... ) ); + using ReturnType = decltype( Action::template call< char >( + std::forward< Args >( args )... ) ); switch( dt ) { case Datatype::CHAR: diff --git a/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp b/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp index 58063b9221..753cce714b 100644 --- a/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp +++ b/include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp @@ -134,11 +134,12 @@ namespace detail * arguments and with the template parameter specified by dt. */ template< typename Action, typename... Args > -auto switchAdios2AttributeType( Datatype dt, Args &&... args ) -> decltype( - Action::template call< char >( std::forward< Args >( args )... ) ) +auto switchAdios2AttributeType( Datatype dt, Args &&... args ) + -> decltype( Action::template call< char >( + std::forward< Args >( args )... ) ) { - using ReturnType = decltype( - Action::template call< char >( std::forward< Args >( args )... ) ); + using ReturnType = decltype( Action::template call< char >( + std::forward< Args >( args )... ) ); switch( dt ) { case Datatype::CHAR: @@ -219,11 +220,12 @@ auto switchAdios2AttributeType( Datatype dt, Args &&... args ) -> decltype( * arguments and with the template parameter specified by dt. */ template< typename Action, typename... Args > -auto switchAdios2VariableType( Datatype dt, Args &&... args ) -> decltype( - Action::template call< char >( std::forward< Args >( args )... ) ) +auto switchAdios2VariableType( Datatype dt, Args &&... args ) + -> decltype( Action::template call< char >( + std::forward< Args >( args )... ) ) { - using ReturnType = decltype( - Action::template call< char >( std::forward< Args >( args )... ) ); + using ReturnType = decltype( Action::template call< char >( + std::forward< Args >( args )... ) ); switch( dt ) { case Datatype::CHAR: diff --git a/include/openPMD/Series.hpp b/include/openPMD/Series.hpp index a5d0ff0513..16d72496d7 100644 --- a/include/openPMD/Series.hpp +++ b/include/openPMD/Series.hpp @@ -249,9 +249,9 @@ class SeriesInterface : public AttributableInterface * software/code/simulation that created the file. * @return Reference to modified series. */ - [ - [deprecated( "Set the version with the second argument of " - "setSoftware()" )]] SeriesInterface & + [[deprecated( + "Set the version with the second argument of " + "setSoftware()" )]] SeriesInterface & setSoftwareVersion( std::string const & softwareVersion ); /** diff --git a/include/openPMD/backend/Container.hpp b/include/openPMD/backend/Container.hpp index 322f5fb1db..267da676e2 100644 --- a/include/openPMD/backend/Container.hpp +++ b/include/openPMD/backend/Container.hpp @@ -372,8 +372,8 @@ class Container : public LegacyAttributable // virtual iterator erase(const_iterator first, const_iterator last) template< class... Args > - auto emplace( Args &&... args ) -> decltype( - InternalContainer().emplace( std::forward< Args >( args )... ) ) + auto emplace( Args &&... args ) -> decltype( InternalContainer().emplace( + std::forward< Args >( args )... ) ) { return m_container->emplace( std::forward< Args >( args )... ); } diff --git a/src/IO/ADIOS/ADIOS2Auxiliary.cpp b/src/IO/ADIOS/ADIOS2Auxiliary.cpp index c23cfb68f9..078f4a0f8d 100644 --- a/src/IO/ADIOS/ADIOS2Auxiliary.cpp +++ b/src/IO/ADIOS/ADIOS2Auxiliary.cpp @@ -198,11 +198,10 @@ namespace detail { case VariableOrAttribute::Attribute: { auto size = shape[ 0 ]; - Datatype openPmdType = size == 1 - ? basicType + Datatype openPmdType = size == 1 ? basicType : size == 7 && basicType == Datatype::DOUBLE - ? Datatype::ARR_DBL_7 - : toVectorType( basicType ); + ? Datatype::ARR_DBL_7 + : toVectorType( basicType ); return openPmdType; } case VariableOrAttribute::Variable: {