Skip to content

Commit

Permalink
STYLE: Replace T var{ NumericTraits<T>::ZeroValue() } with T var{}
Browse files Browse the repository at this point in the history
Replaced brace-initialization by `NumericTraits<T>::ZeroValue()` with empty `{}`
initializers. Did so by Replace in Files, using regular expressions:

    Find what: (\w.+)( .+){ NumericTraits<\1>::ZeroValue\(\) };
    Replace with:  $1$2{};

Follow-up to pull request #3958
commit 42b0bfc
"STYLE: Replace `T var = NumericTraits<T>::ZeroValue()` with `T var{}`"
  • Loading branch information
N-Dekker authored and dzenanz committed Apr 20, 2023
1 parent a980ae9 commit 5ac803e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Modules/Core/Common/include/itkAnnulusOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ class ITK_TEMPLATE_EXPORT AnnulusOperator : public NeighborhoodOperator<TPixel,
double m_Thickness{ 1.0 };
bool m_Normalize{ false };
bool m_BrightCenter{ false };
PixelType m_InteriorValue{ NumericTraits<PixelType>::ZeroValue() };
PixelType m_InteriorValue{};
PixelType m_AnnulusValue{ NumericTraits<PixelType>::OneValue() };
PixelType m_ExteriorValue{ NumericTraits<PixelType>::ZeroValue() };
PixelType m_ExteriorValue{};
SpacingType m_Spacing{ MakeFilled<SpacingType>(1.0) };
};
} // namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ class ITK_TEMPLATE_EXPORT DirectedHausdorffDistanceImageFilter : public ImageToI

DistanceMapPointer m_DistanceMap{ nullptr };

RealType m_MaxDistance{ NumericTraits<RealType>::ZeroValue() };
RealType m_MaxDistance{};
IdentifierType m_PixelCount{};

CompensatedSummationType m_Sum{};

RealType m_DirectedHausdorffDistance{ NumericTraits<RealType>::ZeroValue() };
RealType m_AverageHausdorffDistance{ NumericTraits<RealType>::ZeroValue() };
RealType m_DirectedHausdorffDistance{};
RealType m_AverageHausdorffDistance{};
bool m_UseImageSpacing{ true };

std::mutex m_Mutex{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MaskInput
return VariableLengthVector<TValue>(0);
}
TOutput m_OutsideValue{ DefaultOutsideValue(static_cast<TOutput *>(nullptr)) };
TMask m_MaskingValue{ NumericTraits<TMask>::ZeroValue() };
TMask m_MaskingValue{};
};
} // namespace Functor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MaskNegatedInput
return VariableLengthVector<TValue>(0);
}
TOutput m_OutsideValue{ DefaultOutsideValue(static_cast<TOutput *>(nullptr)) };
TMask m_MaskingValue{ NumericTraits<TMask>::ZeroValue() };
TMask m_MaskingValue{};
};
} // namespace Functor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT ShiftScaleImageFilter : public ImageToImageFilter<TInp
DynamicThreadedGenerateData(const OutputImageRegionType &) override;

private:
RealType m_Shift{ NumericTraits<RealType>::ZeroValue() };
RealType m_Shift{};
RealType m_Scale{ NumericTraits<RealType>::OneValue() };

SizeValueType m_UnderflowCount{ 0 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class ITK_TEMPLATE_EXPORT StatisticsLabelMapFilter
PrintSelf(std::ostream & os, Indent indent) const override;

private:
FeatureImagePixelType m_Minimum{ NumericTraits<FeatureImagePixelType>::ZeroValue() };
FeatureImagePixelType m_Maximum{ NumericTraits<FeatureImagePixelType>::ZeroValue() };
FeatureImagePixelType m_Minimum{};
FeatureImagePixelType m_Maximum{};
unsigned int m_NumberOfBins{ GetDefaultNumberOfBins() };
bool m_ComputeHistogram{ true };
}; // end of class
Expand Down

0 comments on commit 5ac803e

Please sign in to comment.