diff --git a/Modules/Core/Common/test/itkSliceIteratorTest.cxx b/Modules/Core/Common/test/itkSliceIteratorTest.cxx index a5cc6057c73..684593f86b6 100644 --- a/Modules/Core/Common/test/itkSliceIteratorTest.cxx +++ b/Modules/Core/Common/test/itkSliceIteratorTest.cxx @@ -128,12 +128,12 @@ PrintRegion(itk::SmartPointer> I) template void -PrintSlice(TContainer s) +PrintSlice(TContainer s_container) { std::cout << '['; - for (s = s.Begin(); s < s.End(); ++s) + for (auto iter = s_container.Begin(); iter < s_container.End(); ++iter) { - std::cout << *s << ' '; + std::cout << *iter << ' '; } std::cout << ']' << std::endl; }