From 42e9ccb82f525c1e60605e9c06825d0261a5ad39 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 22 Dec 2024 15:03:43 -0600 Subject: [PATCH] STYLE: PrintSlice re-used variable name The variable name s was used as an input and a loop variable. Split the names to clearly indicate the iteration variable intent. --- Modules/Core/Common/test/itkSliceIteratorTest.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }