Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 8, 2021
1 parent c872944 commit f2cec0f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
18 changes: 10 additions & 8 deletions include/openPMD/DatatypeHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
18 changes: 10 additions & 8 deletions include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions include/openPMD/Series.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

/**
Expand Down
4 changes: 2 additions & 2 deletions include/openPMD/backend/Container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )... );
}
Expand Down
7 changes: 3 additions & 4 deletions src/IO/ADIOS/ADIOS2Auxiliary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit f2cec0f

Please sign in to comment.