From e6103eb06b31d63c764b4b338170cb48b8b701cc Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 7 May 2024 14:09:54 +0200 Subject: [PATCH] COMP: Fix `-Wshadow` warnings on local `samplenr` variable Fixed GCC/ubuntu "warning: declaration of 'samplenr' shadows a previous local [-Wshadow]", by moving one local `samplenr` variable beyond the other. --- Common/itkComputeJacobianTerms.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/itkComputeJacobianTerms.hxx b/Common/itkComputeJacobianTerms.hxx index 3714115e2..e950f094d 100644 --- a/Common/itkComputeJacobianTerms.hxx +++ b/Common/itkComputeJacobianTerms.hxx @@ -71,8 +71,6 @@ ComputeJacobianTerms::Compute(double & TrC, double & Tr /** Get scales vector */ const ScalesType & scales = this->m_Scales; - unsigned int samplenr = 0; - /** Variables for nonzerojacobian indices and the Jacobian. */ const NumberOfParametersType sizejacind = this->m_Transform->GetNumberOfNonZeroJacobianIndices(); JacobianType jacj(outdim, sizejacind); @@ -225,6 +223,8 @@ ComputeJacobianTerms::Compute(double & TrC, double & Tr /** Initialize band matrix. */ CovarianceMatrixType bandcov(numberOfParameters, bandcovsize, 0.0); + unsigned int samplenr = 0; + /** * TERM 1 *