Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default default-constructor of ConstantBoundaryCondition and other Core/Common class templates #3929

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
13aadd7
STYLE: Default default-constructor of ConstantBoundaryCondition
N-Dekker Feb 16, 2023
0c4de3f
STYLE: Default default-constructor of CompensatedSummation
N-Dekker Feb 16, 2023
4812c9f
COMP: Fix warning: unused variable 'compensatedSum' [-Wunused-variable]
N-Dekker Feb 17, 2023
222f049
STYLE: Default default-constructor of SpatialFunction classes
N-Dekker Feb 16, 2023
7dad3a3
STYLE: Default default-constructor of Image classes
N-Dekker Feb 16, 2023
d8ed914
STYLE: Default default-constructor of ImageRandom ConstIterator classes
N-Dekker Feb 16, 2023
38f4584
STYLE: Default default-constructor of ConstNeighborhoodIterator
N-Dekker Feb 16, 2023
b93358c
STYLE: Default default-constructor ImageVectorOptimizerParametersHelper
N-Dekker Feb 16, 2023
7e6d14e
STYLE: Default default-constructor of ImportImageContainer and Filter
N-Dekker Feb 16, 2023
f752fc4
STYLE: Default default-constructor of MinimumMaximumImageCalculator
N-Dekker Feb 16, 2023
5a200f9
STYLE: Default default-constructor of ObjectStore and MemoryBlock
N-Dekker Feb 16, 2023
5918bdf
STYLE: Default default-constructor of PointSet
N-Dekker Feb 16, 2023
76937ea
STYLE: Default default-constructor of PriorityQueueContainer
N-Dekker Feb 16, 2023
3de9994
STYLE: Default default-constructor of RegularizedHeavisideStepFunction
N-Dekker Feb 16, 2023
8e7a0de
STYLE: Default default-constructor of ThreadedImageRegionPartitioner
N-Dekker Feb 16, 2023
dca046a
STYLE: Default default-constructor of VariableLengthVector
N-Dekker Feb 16, 2023
d5fa8ae
STYLE: Default default-constructor of Versor
N-Dekker Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Modules/Core/Common/include/itkCompensatedSummation.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkConstantBoundaryCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition : public ImageBoundaryCondit
static constexpr unsigned int ImageDimension = Superclass::ImageDimension;

/** Default constructor. */
ConstantBoundaryCondition();
ConstantBoundaryCondition() = default;

/** Utility for printing the boundary condition. */
void
Expand Down
7 changes: 0 additions & 7 deletions Modules/Core/Common/include/itkConstantBoundaryCondition.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
namespace itk
{

template <typename TInputImage, typename TOutputImage>
ConstantBoundaryCondition<TInputImage, TOutputImage>::ConstantBoundaryCondition()
{
OutputPixelType p{};
m_Constant = NumericTraits<OutputPixelType>::ZeroValue(p);
}

template <typename TInputImage, typename TOutputImage>
typename ConstantBoundaryCondition<TInputImage, TOutputImage>::OutputPixelType
ConstantBoundaryCondition<TInputImage, TOutputImage>::operator()(const OffsetType &,
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/test/itkCompensatedSummationTest2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class CompensatedSummationTest2Associate
void
ThreadedExecution(const DomainType & subdomain, const itk::ThreadIdType threadId) override
{
itk::CompensatedSummation<double> compensatedSum;
dzenanz marked this conversation as resolved.
Show resolved Hide resolved
for (DomainType::IndexValueType i = subdomain[0]; i <= subdomain[1]; ++i)
{
double value = 1.0 / 7;
Expand Down