Skip to content

Commit

Permalink
STYLE: Replace Fill(static_cast<RealType>(0.0)) with {} in test
Browse files Browse the repository at this point in the history
Follow-up to pull request InsightSoftwareConsortium#4881
commit 569a8b6
"STYLE: Replace Fill(0) with {} initializer for local variables in tests"
  • Loading branch information
N-Dekker committed Oct 23, 2024
1 parent 6815b4e commit e706fcc
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,13 @@ itkEuclideanDistancePointSetMetricRegistrationTest(int argc, char * argv[])
FieldType::SpacingType spacing;
spacing.Fill(static_cast<RealType>(1.0));

FieldType::DirectionType direction;
direction.Fill(static_cast<RealType>(0.0));
FieldType::DirectionType direction{};
for (unsigned int d = 0; d < Dimension; ++d)
{
direction[d][d] = static_cast<RealType>(1.0);
}

FieldType::PointType origin;
origin.Fill(static_cast<RealType>(0.0));
FieldType::PointType origin{};

auto regionSize = RegionType::SizeType::Filled(static_cast<itk::SizeValueType>(pointMax) + 1);

Expand All @@ -280,8 +278,7 @@ itkEuclideanDistancePointSetMetricRegistrationTest(int argc, char * argv[])
displacementField->SetSpacing(spacing);
displacementField->SetRegions(region);
displacementField->Allocate();
DisplacementFieldTransformType::OutputVectorType zeroVector;
zeroVector.Fill(static_cast<RealType>(0.0));
DisplacementFieldTransformType::OutputVectorType zeroVector{};
displacementField->FillBuffer(zeroVector);
displacementTransform->SetDisplacementField(displacementField);

Expand Down

0 comments on commit e706fcc

Please sign in to comment.