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 Mar 2, 2022
1 parent f379ca8 commit 5509b3b
Show file tree
Hide file tree
Showing 15 changed files with 189 additions and 203 deletions.
4 changes: 2 additions & 2 deletions include/openPMD/Iteration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ namespace internal
*/
class Iteration : public Attributable
{
template<
template <
typename T,
typename T_key,
typename T_container,
typename T_AttributableBase >
typename T_AttributableBase>
friend class Container;
friend class Series;
friend class WriteIterations;
Expand Down
14 changes: 7 additions & 7 deletions include/openPMD/RecordComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ namespace internal

class RecordComponent : public BaseRecordComponent
{
template<
template <
typename T,
typename T_key,
typename T_container,
typename T_AttributableBase >
typename T_AttributableBase>
friend class Container;
friend class Iteration;
friend class ParticleSpecies;
template< typename T_elem, typename T_RecordComponent >
template <typename T_elem, typename T_RecordComponent>
friend class BaseRecord;
template <typename T_elem>
friend class BaseRecordInterface;
Expand Down Expand Up @@ -325,19 +325,19 @@ OPENPMD_protected

using DataClass = internal::RecordComponentData;

RecordComponent( std::shared_ptr< DataClass > );
RecordComponent(std::shared_ptr<DataClass>);

inline DataClass const & get() const
inline DataClass const &get() const
{
return *m_recordComponentData;
}

inline DataClass & get()
inline DataClass &get()
{
return *m_recordComponentData;
}

inline void setData( std::shared_ptr< DataClass > data )
inline void setData(std::shared_ptr<DataClass> data)
{
m_recordComponentData = std::move(data);
BaseRecordComponent::setData(m_recordComponentData);
Expand Down
10 changes: 5 additions & 5 deletions include/openPMD/auxiliary/TypeTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ namespace detail
template <typename T>
inline constexpr bool IsVector_v = detail::IsVector<T>::value;

template< typename T >
inline constexpr bool IsArray_v = detail::IsArray< T >::value;
template <typename T>
inline constexpr bool IsArray_v = detail::IsArray<T>::value;

template< typename T, typename /* U */ >
template <typename T, typename /* U */>
struct OkOr
{
using type = T;
};

template< typename U >
struct OkOr< void, U >
template <typename U>
struct OkOr<void, U>
{
using type = U;
};
Expand Down
18 changes: 9 additions & 9 deletions include/openPMD/backend/Attributable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace internal
"' must not be empty!");
}

template< typename, typename >
template <typename, typename>
class BaseRecordData;
} // namespace internal

Expand All @@ -119,19 +119,19 @@ namespace internal
class Attributable
{
// @todo remove unnecessary friend (wew that sounds bitter)
using A_MAP = std::map< std::string, Attribute >;
friend Writable * getWritable( Attributable * );
template< typename T_elem, typename T_RecordComponent >
using A_MAP = std::map<std::string, Attribute>;
friend Writable *getWritable(Attributable *);
template <typename T_elem, typename T_RecordComponent>
friend class BaseRecord;
template< typename T_elem >
template <typename T_elem>
friend class BaseRecordInterface;
template< typename, typename >
template <typename, typename>
friend class internal::BaseRecordData;
template<
template <
typename T,
typename T_key,
typename T_container,
typename T_AttributableBase >
typename T_AttributableBase>
friend class Container;
template <typename T>
friend struct traits::GenerationPolicy;
Expand All @@ -143,7 +143,7 @@ class Attributable
protected:
using DataClass = internal::AttributableData;

std::shared_ptr< DataClass > m_attri{ new DataClass() };
std::shared_ptr<DataClass> m_attri{new DataClass()};

// Should not be called publicly, only by implementing classes
Attributable(std::shared_ptr<internal::AttributableData>);
Expand Down
Loading

0 comments on commit 5509b3b

Please sign in to comment.