diff --git a/Modules/Core/Common/include/itkIndexRange.h b/Modules/Core/Common/include/itkIndexRange.h index cab30acb746..e07399b3e93 100644 --- a/Modules/Core/Common/include/itkIndexRange.h +++ b/Modules/Core/Common/include/itkIndexRange.h @@ -294,12 +294,12 @@ class IndexRange final /** Constructs a range of indices for the specified grid size. */ - explicit IndexRange(const SizeType& size) + explicit IndexRange(const SizeType& gridSize) : // Note: Use parentheses instead of curly braces to initialize data members, // to avoid AppleClang 6.0.0.6000056 compile errors, "no viable conversion..." m_MinIndex(), - m_MaxIndex(CalculateMaxIndex({}, size)) + m_MaxIndex(CalculateMaxIndex({}, gridSize)) { } diff --git a/Modules/Core/Common/test/itkIndexRangeGTest.cxx b/Modules/Core/Common/test/itkIndexRangeGTest.cxx index a0ae0028850..ef8d9937eb6 100644 --- a/Modules/Core/Common/test/itkIndexRangeGTest.cxx +++ b/Modules/Core/Common/test/itkIndexRangeGTest.cxx @@ -140,7 +140,7 @@ TEST(IndexRange, IteratorsCanBePassedToStdForEach) std::for_each(range.begin(), range.end(), [](const IndexType index) { - EXPECT_TRUE(index >= IndexType{}); + EXPECT_TRUE(index >= IndexType()); }); } @@ -155,7 +155,7 @@ TEST(IndexRange, CanBeUsedAsExpressionOfRangeBasedForLoop) for (auto&& index : range) { - EXPECT_TRUE(index >= IndexType{}); + EXPECT_TRUE(index >= IndexType()); } }