Skip to content

Commit

Permalink
STYLE: Default default-constructor of CompensatedSummation
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker authored and dzenanz committed Feb 23, 2023
1 parent 67ec658 commit 015e936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Modules/Core/Common/include/itkCompensatedSummation.h
Expand Up @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation
using Self = CompensatedSummation;

/** Constructors. */
CompensatedSummation();
CompensatedSummation() = default;
CompensatedSummation(FloatType value);

/** Copy constructor. */
Expand Down Expand Up @@ -120,8 +120,8 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation
explicit operator FloatType() const;

private:
AccumulateType m_Sum;
AccumulateType m_Compensation;
AccumulateType m_Sum{};
AccumulateType m_Compensation{};

// Maybe support more types in the future with template specialization.
#ifdef ITK_USE_CONCEPT_CHECKING
Expand Down
7 changes: 0 additions & 7 deletions Modules/Core/Common/include/itkCompensatedSummation.hxx
Expand Up @@ -58,13 +58,6 @@ CompensatedSummationAddElement(TFloat & compensation, TFloat & sum, const TFloat
# endif // _MSC_VER
#endif // not itkCompensatedSummation_cxx

template <typename TFloat>
CompensatedSummation<TFloat>::CompensatedSummation()
: m_Sum(NumericTraits<AccumulateType>::ZeroValue())
, m_Compensation(NumericTraits<AccumulateType>::ZeroValue())
{}


template <typename TFloat>
CompensatedSummation<TFloat>::CompensatedSummation(const TFloat value)
: m_Sum(value)
Expand Down

0 comments on commit 015e936

Please sign in to comment.